aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/gmg_commands/util.py')
-rw-r--r--mediagoblin/gmg_commands/util.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mediagoblin/gmg_commands/util.py b/mediagoblin/gmg_commands/util.py
index 6a6853d5..8b057996 100644
--- a/mediagoblin/gmg_commands/util.py
+++ b/mediagoblin/gmg_commands/util.py
@@ -17,6 +17,7 @@
from mediagoblin import app
import getpass
+import argparse
def setup_app(args):
@@ -36,5 +37,11 @@ def prompt_if_not_set(variable, text, password=False):
variable=raw_input(text + u' ')
else:
variable=getpass.getpass(text + u' ')
-
+
return variable
+
+
+def check_unrecognized_args(args):
+ if args[1]:
+ parser = argparse.ArgumentParser()
+ parser.error('unrecognized arguments: {}'.format(args[1]))