Prechádzať zdrojové kódy

Automatically show python-appimage usage when no arguments are provided

Fixes #21
Srevin Saju 5 rokov pred
rodič
commit
9088e7fc84
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  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: