aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/main.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-09-30 21:19:42 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2019-09-30 21:19:42 +0100
commit240e9d6dbb8b1e26c50889e3f91765f943b78740 (patch)
tree807c671e334462914db84d0e2bf21e5e63bff8f9 /datamaps/main.py
parent3fd0dec3a124df0c95dfd5843cdafc19abed6eca (diff)
partially through capturing proper exception text
Diffstat (limited to 'datamaps/main.py')
-rw-r--r--datamaps/main.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/datamaps/main.py b/datamaps/main.py
index 8e78a93..966482c 100644
--- a/datamaps/main.py
+++ b/datamaps/main.py
@@ -97,6 +97,12 @@ def templates(to_master):
except MalFormedCSVHeaderException as e:
click.echo(
click.style("Incorrect headers in datamap. {}.".format(e.args[0]), bold=True, reverse=True, fg="cyan"))
+ except KeyError as e:
+ if "Expected Sheet Missing" in e.args:
+ click.echo("Expected Sheet Missing: sheet Introduction in test_template.xlsm is expected from" \
+ " datamap.csv. Not processing that file until fixed." \
+ "Imported data from input/dft1_temp.xlsm to output/master.xlsx." \
+ "Finished.")
else:
click.secho("Not implemented yet. Try --to-master/-m flag")