diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-09-30 21:19:42 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-09-30 21:19:42 +0100 |
commit | 240e9d6dbb8b1e26c50889e3f91765f943b78740 (patch) | |
tree | 807c671e334462914db84d0e2bf21e5e63bff8f9 /datamaps/main.py | |
parent | 3fd0dec3a124df0c95dfd5843cdafc19abed6eca (diff) |
partially through capturing proper exception text
Diffstat (limited to 'datamaps/main.py')
-rw-r--r-- | datamaps/main.py | 6 |
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") |