Remove double output, typo
continuous-integration/drone/push Build is failing Details

pull/12/head
Julian-Samuel Gebühr 2023-05-03 14:45:53 +02:00 committed by Gitea
parent 173aac081d
commit a646714f76
1 changed files with 1 additions and 6 deletions

View File

@ -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: