aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-10-27 17:07:11 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2019-10-27 17:07:11 +0000
commit143caca9a48be3c80427afc3546ffc29ad79b705 (patch)
treec6d317152f61710e707bc758086b9da662d9ad19
parentcc45cade1d1c7cf7eb93e02b834c6a38d464dac1 (diff)
now handles DatamapFileEncodingError
-rw-r--r--datamaps/main.py8
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.")