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

This commit is contained in:
moanos [he/him] 2023-01-13 08:12:29 +01:00
parent 1565f17778
commit 2066c0332d

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)