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 committed by Georg Krause
parent d9d3f02fda
commit 6d2a4d82b4
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22

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)