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

Reviewed-on: https://git.gieszer.link/gcrkrause/mastodon-blocklist-deploy/pulls/4
This commit is contained in:
moanos 2023-01-12 15:56:07 +01:00
commit b4ef4b9199

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__":