From 62bd5d9aa22bd3cb304230738fe6679c05da0378 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Nov 27 2018 16:56:02 +0000 Subject: Move argparse fix to rpkg The fix is valid also for rhpkg and moving it to rpkg will prevent code duplication. Fixes: #299 Signed-off-by: Ondrej Nosek --- diff --git a/fedpkg/__main__.py b/fedpkg/__main__.py index 5d68a54..ed2eac2 100644 --- a/fedpkg/__main__.py +++ b/fedpkg/__main__.py @@ -59,14 +59,6 @@ def main(): client.do_imports(site='fedpkg') client.parse_cmdline() - # This is due to a difference argparse behavior to Python 2 version. - # In Python 3, argparse will proceed to here without reporting - # "too few arguments". Instead, client.args does not have attribute - # command. - if not hasattr(client.args, 'command'): - client.parser.print_help() - sys.exit(1) - if not client.args.path: try: client.args.path = pyrpkg.utils.getcwd()