From 0ecc92537370fcb5972537def6f5004e6928c2a2 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Thu, 12 Jan 2023 12:36:46 +0100 Subject: [PATCH] fix: Avoid exception when output is missing for exports --- mastodon_blocklist_deploy/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mastodon_blocklist_deploy/cli.py b/mastodon_blocklist_deploy/cli.py index 7e81763..8ac9c8b 100644 --- a/mastodon_blocklist_deploy/cli.py +++ b/mastodon_blocklist_deploy/cli.py @@ -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__":