fix: Avoid exception when output is missing for exports

fix-exception-with-missing-output
Georg Krause 2023-01-12 12:36:46 +01:00
parent c54beb76d3
commit 0ecc925373
Signed by: gcrkrause
GPG Key ID: 2970D504B2183D22
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ 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":
export_blocklist_toml(remote_blocklist, args.output)
if not args.output:
print("Export currently requires to pass --output as well")
else:
export_blocklist_toml(remote_blocklist, args.output)
if __name__ == "__main__":