aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/main.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-10-26 16:04:11 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2019-10-26 16:04:11 +0100
commitd9c3a460023f59264ebd55342c3f538f62de2ecc (patch)
tree50601161d4d4d362fcad55b1a1e87c0ef103cc04 /datamaps/main.py
parent5283dccd338e5e2f4cfc40a64f81e9de0b2d1e5f (diff)
raises CRITICAL if datamap missing key field on export or import - version bump
Diffstat (limited to '')
-rw-r--r--datamaps/main.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/datamaps/main.py b/datamaps/main.py
index 9c8b8da..c66e177 100644
--- a/datamaps/main.py
+++ b/datamaps/main.py
@@ -28,7 +28,7 @@ from datamaps import __version__
from engine.adapters import cli as engine_cli
from engine.config import Config as engine_config
from engine.exceptions import (MalFormedCSVHeaderException,
- MissingSheetFieldError,
+ MissingCellKeyError, MissingSheetFieldError,
NoApplicableSheetsInTemplateFiles,
RemoveFileWithNoSheetRequiredByDatamap)
@@ -120,6 +120,9 @@ def templates(to_master):
except MissingSheetFieldError as e:
logger.critical(e)
sys.exit(1)
+ except MissingCellKeyError as e:
+ logger.critical(e)
+ sys.exit(1)
else:
click.secho("Not implemented yet. Try --to-master/-m flag")
@@ -154,6 +157,9 @@ def master(master):
except MissingSheetFieldError as e:
logger.critical(e)
sys.exit(1)
+ except MissingCellKeyError as e:
+ logger.critical(e)
+ sys.exit(1)
be_logger.info("Export complete.")