Skip to content

Commit 982dc00

Browse files
committed
Handle KeyError on wrong config.
1 parent bd73f53 commit 982dc00

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scrolltext/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ def main():
2727
cfg = init_utils(write_config)
2828
action = action or _str_to_action_type(cfg["main"]["action"])
2929
action(write_config)
30+
except KeyError as e:
31+
print("KeyError occured: " + str(e) +
32+
"\nProbalby check config?")
3033
except NameError as e:
3134
print("NameError occured: " + str(e))
32-
print("Probalby check config?")
3335

3436

3537
def _parse_args(): # pylint: disable=inconsistent-return-statements (R1710)

0 commit comments

Comments
 (0)