diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-27 17:07:11 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-27 17:07:11 +0000 |
commit | 143caca9a48be3c80427afc3546ffc29ad79b705 (patch) | |
tree | c6d317152f61710e707bc758086b9da662d9ad19 | |
parent | cc45cade1d1c7cf7eb93e02b834c6a38d464dac1 (diff) |
now handles DatamapFileEncodingError
-rw-r--r-- | datamaps/main.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/datamaps/main.py b/datamaps/main.py index c66e177..acbd4d2 100644 --- a/datamaps/main.py +++ b/datamaps/main.py @@ -30,7 +30,7 @@ from engine.config import Config as engine_config from engine.exceptions import (MalFormedCSVHeaderException, MissingCellKeyError, MissingSheetFieldError, NoApplicableSheetsInTemplateFiles, - RemoveFileWithNoSheetRequiredByDatamap) + RemoveFileWithNoSheetRequiredByDatamap, DatamapFileEncodingError) logging.basicConfig(level=logging.INFO, format="%(asctime)s: %(levelname)s - %(message)s", datefmt='%d-%b-%y %H:%M:%S') logger = logging.getLogger(__name__) @@ -123,6 +123,9 @@ def templates(to_master): except MissingCellKeyError as e: logger.critical(e) sys.exit(1) + except DatamapFileEncodingError as e: + logger.critical(e) + sys.exit(1) else: click.secho("Not implemented yet. Try --to-master/-m flag") @@ -160,6 +163,9 @@ def master(master): except MissingCellKeyError as e: logger.critical(e) sys.exit(1) + except DatamapFileEncodingError as e: + logger.critical(e) + sys.exit(1) be_logger.info("Export complete.") |