From 262c789754931d95a4bb567fc59a3ffb833ed1bb Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Thu, 1 Aug 2013 11:11:04 -0700 Subject: Throw an error if there are unrecognized arguments --- mediagoblin/gmg_commands/import_export.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mediagoblin/gmg_commands/import_export.py') 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 ' -- cgit v1.2.3