fix: Avoid exception when input is missing for diff and deploy

pull/8/head
Julian-Samuel Gebühr 2023-01-13 08:12:29 +01:00
parent 1565f17778
commit 2066c0332d
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ def cli():
blocklist_filename = args.input_file
else:
blocklist_filename = "../blocklist.toml"
local_blocklist = load_blocklist_file(blocklist_filename)
try:
local_blocklist = load_blocklist_file(blocklist_filename)
except FileNotFoundError:
print("Local blocklist file was not found. Make sure to specify it's location via -i")
exit()
if args.action == "diff":
Instance.show_diffs(local_blocklist, remote_blocklist)