| |
@@ -2378,6 +2378,14 @@
|
| |
# Parse the args
|
| |
self.args = self.parser.parse_args()
|
| |
|
| |
+ # 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, self.args does not have attribute
|
| |
+ # command.
|
| |
+ if not hasattr(self.args, 'command'):
|
| |
+ self.parser.print_help()
|
| |
+ sys.exit(1)
|
| |
+
|
| |
if self.args.module_name and self.args.repo_name:
|
| |
self.parser.error(
|
| |
'argument --name: not allowed with --module-name')
|
| |
The fix is valid also for rhpkg and moving it to rpkg will prevent code
duplication.
Fixes: #398
Signed-off-by: Ondrej Nosek onosek@redhat.com