aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'datamaps/main.py')
-rw-r--r--datamaps/main.py10
1 files changed, 10 insertions, 0 deletions
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()