fix type hint in checking if output files exist

This commit is contained in:
deeplow 2022-08-04 12:04:07 +01:00
parent 46a62c1669
commit 95ed34626d
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -52,7 +52,7 @@ def cli_main(
return return
try: try:
with open(os.path.abspath(output_filename), "wb") as f: with open(os.path.abspath(output_filename), "rb") as f:
pass pass
except: except:
valid = False valid = False
@ -68,7 +68,7 @@ def cli_main(
f"{os.path.splitext(common.input_filename)[0]}-safe.pdf" f"{os.path.splitext(common.input_filename)[0]}-safe.pdf"
) )
try: try:
with open(common.output_filename, "wb") as f: with open(common.output_filename, "rb") as f:
pass pass
except: except:
click.echo( click.echo(