aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands
diff options
context:
space:
mode:
authorBoris Bobrov <breton@cynicmansion.ru>2018-07-11 16:53:32 +0200
committerBoris Bobrov <breton@cynicmansion.ru>2018-07-11 16:53:32 +0200
commit4024bcddf9871d33ee8f528c5f6d131c4e386b2e (patch)
tree45e3d6f4cf796ac75195ec55a3dc4538753f4fb7 /mediagoblin/gmg_commands
parente08de70757b6f973bc2955f1b3292d383a19b21d (diff)
downloadmediagoblin-4024bcddf9871d33ee8f528c5f6d131c4e386b2e.tar.lz
mediagoblin-4024bcddf9871d33ee8f528c5f6d131c4e386b2e.tar.xz
mediagoblin-4024bcddf9871d33ee8f528c5f6d131c4e386b2e.zip
fix default gmg help message
Diffstat (limited to 'mediagoblin/gmg_commands')
-rw-r--r--mediagoblin/gmg_commands/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/gmg_commands/__init__.py b/mediagoblin/gmg_commands/__init__.py
index 98b097a6..0034fd98 100644
--- a/mediagoblin/gmg_commands/__init__.py
+++ b/mediagoblin/gmg_commands/__init__.py
@@ -145,7 +145,10 @@ def main_cli():
os.path.join(parent_directory, "mediagoblin.example.ini"),
os.path.join(parent_directory, "mediagoblin.ini"))
- args.func(args)
+ try:
+ args.func(args)
+ except AttributeError: # no subcommand or no func of subcommand
+ parser.print_help()
if __name__ == '__main__':