Merge pull request 'fix: Avoid exception when output is missing for exports' (#4) from fix-exception-with-missing-output into develop

Reviewed-on: gcrkrause/mastodon-blocklist-deploy#4
toml-dump
moanos 2023-01-12 15:56:07 +01:00
commit b4ef4b9199
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__":