diff options
-rw-r--r-- | datamaps/__init__.py | 2 | ||||
-rw-r--r-- | datamaps/main.py | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/datamaps/__init__.py b/datamaps/__init__.py index a82b376..72f26f5 100644 --- a/datamaps/__init__.py +++ b/datamaps/__init__.py @@ -1 +1 @@ -__version__ = "1.1.1" +__version__ = "1.1.2" diff --git a/datamaps/main.py b/datamaps/main.py index 4efbfe7..6029ae9 100644 --- a/datamaps/main.py +++ b/datamaps/main.py @@ -36,6 +36,7 @@ from engine.exceptions import ( NoApplicableSheetsInTemplateFiles, RemoveFileWithNoSheetRequiredByDatamap, DatamapNotCSVException, + NestedZipError ) logging.basicConfig( @@ -218,6 +219,9 @@ def templates(to_master, datamap, zipinput, rowlimit, inputdir, validationonly): if rowlimit == 0: logging.critical("Row limit cannot be 0. Quitting.") sys.exit(1) + if zipinput and inputdir: + logging.critical("Cannot select both --inputdir and --zipinput/-z flags.") + sys.exit(1) if to_master and validationonly: logging.critical( "Cannot select both -m/--to-master and -v/--validationonly flags." @@ -265,6 +269,9 @@ def templates(to_master, datamap, zipinput, rowlimit, inputdir, validationonly): except DatamapNotCSVException as e: logger.critical(e) sys.exit(1) + except NestedZipError as e: + logger.critical(e) + sys.exit(1) if to_master: try: @@ -307,6 +314,9 @@ def templates(to_master, datamap, zipinput, rowlimit, inputdir, validationonly): except DatamapNotCSVException as e: logger.critical(e) sys.exit(1) + except NestedZipError as e: + logger.critical(e) + sys.exit(1) @export.command() |