From 4c64b5bf1411542450134b7d3bb2ef09b64711b1 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jun 12 2018 01:31:27 +0000 Subject: Merge #186 `Corrects the invalid treatment of --user as --user-config` --- diff --git a/fedpkg/__main__.py b/fedpkg/__main__.py index c7ea14c..5d68a54 100644 --- a/fedpkg/__main__.py +++ b/fedpkg/__main__.py @@ -9,7 +9,6 @@ # option) any later version. See http://www.gnu.org/copyleft/gpl.html for # the full text of the license. -import argparse import logging import os import sys @@ -33,7 +32,10 @@ def main(): default_user_config_path = os.path.join( os.path.expanduser('~'), '.config', 'rpkg', '%s.conf' % cli_name) # Setup an argparser and parse the known commands to get the config file - parser = argparse.ArgumentParser(add_help=False) + # - use the custom ArgumentParser class from pyrpkg.cli and dissable + # argument abbreviation to ensure that --user will be not treated as + # --user-config + parser = pyrpkg.cli.ArgumentParser(add_help=False, allow_abbrev=False) parser.add_argument('-C', '--config', help='Specify a config file to use', default='/etc/rpkg/%s.conf' % cli_name) parser.add_argument(