Browse Source

Automatically show python-appimage usage when no arguments are provided

Fixes #21
Srevin Saju 5 năm trước cách đây
mục cha
commit
9088e7fc84
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      python_appimage/__main__.py

+ 5 - 0
python_appimage/__main__.py

@@ -82,6 +82,11 @@ def main():
     if args.verbosity:
         logging.getLogger().setLevel(args.verbosity)
 
+    # check if no arguments are passed
+    if args.command is None:
+        parser.print_help()
+        return
+
     # Call the requested command
     module = '.commands.' + args.command
     if args.sub_command: