From a646714f76c7cb6b4c61f693410957df2876e368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 3 May 2023 14:45:53 +0200 Subject: [PATCH] Remove double output, typo --- mastodon_blocklist_deploy/cli.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mastodon_blocklist_deploy/cli.py b/mastodon_blocklist_deploy/cli.py index a8faa5d..55abf97 100644 --- a/mastodon_blocklist_deploy/cli.py +++ b/mastodon_blocklist_deploy/cli.py @@ -48,11 +48,6 @@ def remove_key_from_dict(dict, key): def exporter(blocklist, output=None, format: str = "toml", private: bool = False): if format == "markdown": exported_text = blocklist_to_markdown(blocklist, private) - if output is not None: - with open(output, "w") as f: - f.write(exported_text) - else: - print(exported_text) if format == "toml": exported_text = blocklist_to_toml(blocklist, private) @@ -80,7 +75,7 @@ def cli(): parser.add_argument('-v', '--verbose', action='store_true') parser.add_argument('-n', '--no-delete', action='store_true', help="Do not delete existing blocks") parser.add_argument('--format', help="Export format: toml|markdown") - parser.add_argument('--private', action='store_true', help="When the flag is set private comment will also be " + parser.add_argument('--private', action='store_true', help="When the flag is set, private comment will also be " "exported.") args = parser.parse_args() if args.verbose: