aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/import_export.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-01 11:11:04 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 15:30:13 -0700
commit262c789754931d95a4bb567fc59a3ffb833ed1bb (patch)
tree56850ddddf59cd52b401210d8cea0154781973c3 /mediagoblin/gmg_commands/import_export.py
parentaa387fc57ec1c176a739df8c5f4cedaf70ae9af1 (diff)
downloadmediagoblin-262c789754931d95a4bb567fc59a3ffb833ed1bb.tar.lz
mediagoblin-262c789754931d95a4bb567fc59a3ffb833ed1bb.tar.xz
mediagoblin-262c789754931d95a4bb567fc59a3ffb833ed1bb.zip
Throw an error if there are unrecognized arguments
Diffstat (limited to 'mediagoblin/gmg_commands/import_export.py')
-rw-r--r--mediagoblin/gmg_commands/import_export.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mediagoblin/gmg_commands/import_export.py b/mediagoblin/gmg_commands/import_export.py
index 2a624b96..1d4ae1f7 100644
--- a/mediagoblin/gmg_commands/import_export.py
+++ b/mediagoblin/gmg_commands/import_export.py
@@ -16,6 +16,7 @@
from mediagoblin import mg_globals
from mediagoblin.db.open import setup_connection_and_db_from_config
+from mediagoblin.gmg_commands import util as commands_util
from mediagoblin.storage.filestorage import BasicFileStorage
from mediagoblin.init import setup_storage, setup_global_and_app_config
@@ -96,6 +97,7 @@ def env_import(args):
'''
Restore mongo database and media files from a tar archive
'''
+ commands_util.check_unrecognized_args(args)
if not args[0].cache_path:
args[0].cache_path = tempfile.mkdtemp()
@@ -223,6 +225,7 @@ def env_export(args):
'''
Export database and media files to a tar archive
'''
+ commands_util.check_unrecognized_args(args)
if args.cache_path:
if os.path.exists(args[0].cache_path):
_log.error('The cache directory must not exist '