From d9c3a460023f59264ebd55342c3f538f62de2ecc Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 26 Oct 2019 16:04:11 +0100 Subject: raises CRITICAL if datamap missing key field on export or import - version bump --- datamaps/__init__.py | 2 +- datamaps/main.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/datamaps/__init__.py b/datamaps/__init__.py index bd25841..250a5fc 100644 --- a/datamaps/__init__.py +++ b/datamaps/__init__.py @@ -1 +1 @@ -__version__ = "1.0.0b10" +__version__ = "1.0.0b11" 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.") -- cgit v1.2.3