mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Exit cli with -1 on failure
This commit is contained in:
parent
32792fc143
commit
7e74371edd
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import click
|
import click
|
||||||
from colorama import Fore, Style
|
from colorama import Fore, Style
|
||||||
|
@ -108,5 +109,7 @@ def cli_main(output_filename, ocr_lang, filename):
|
||||||
):
|
):
|
||||||
print_header("Safe PDF created successfully")
|
print_header("Safe PDF created successfully")
|
||||||
click.echo(common.output_filename)
|
click.echo(common.output_filename)
|
||||||
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
print_header("Failed to convert document")
|
print_header("Failed to convert document")
|
||||||
|
sys.exit(-1)
|
||||||
|
|
Loading…
Reference in a new issue