mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
fix type hint in checking if output files exist
This commit is contained in:
parent
46a62c1669
commit
95ed34626d
1 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue