aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2021-01-25 20:55:00 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2021-01-25 20:55:00 +0000
commit593f1d3b3ca2fe93ae809ca2f82c13995db4c94b (patch)
treea24cae8a64de7bb4030eb6556ae074f6faadacec
parentb9d3472df20d145b0717ab8f578033d8c4cf5d16 (diff)
now handles --inputdir and --zipinput and NestedZipError
-rw-r--r--datamaps/__init__.py2
-rw-r--r--datamaps/main.py10
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()