Parcourir la source

Automatically show python-appimage usage when no arguments are provided

Fixes #21
Srevin Saju il y a 5 ans
Parent
commit
9088e7fc84
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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: