From 938190a7b0f131d729bdc25637acdc0dde62516e Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 8 Nov 2019 16:49:48 +0000 Subject: included exception handling for when line is missing in datamap --- datamaps/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/datamaps/main.py b/datamaps/main.py index cb3c368..f607e6e 100644 --- a/datamaps/main.py +++ b/datamaps/main.py @@ -29,7 +29,8 @@ from engine.adapters import cli as engine_cli from engine.config import Config as engine_config from engine.exceptions import (DatamapFileEncodingError, MalFormedCSVHeaderException, - MissingCellKeyError, MissingSheetFieldError, + MissingCellKeyError, MissingLineError, + MissingSheetFieldError, NoApplicableSheetsInTemplateFiles, RemoveFileWithNoSheetRequiredByDatamap) @@ -167,6 +168,9 @@ def master(master): except DatamapFileEncodingError as e: logger.critical(e) sys.exit(1) + except MissingLineError as e: + logger.critical(e) + sys.exit(1) be_logger.info("Export complete.") @@ -204,3 +208,6 @@ def check(): except DatamapFileEncodingError as e: logger.critical(e) sys.exit(1) + except MissingLineError as e: + logger.critical(e) + sys.exit(1) -- cgit v1.2.3