fix: Avoid exception when output is missing for exports

This commit is contained in:
Georg Krause 2023-01-12 12:36:46 +01:00
parent c54beb76d3
commit 0ecc925373
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22

View File

@ -97,6 +97,9 @@ def cli():
diffs = Instance.list_diffs(local_blocklist, remote_blocklist)
Instance.apply_blocks_from_diff(diffs, args.server, args.token, args.no_delete)
elif args.action == "export":
if not args.output:
print("Export currently requires to pass --output as well")
else:
export_blocklist_toml(remote_blocklist, args.output)