Fix exception handling in asciidoc2html.
This commit is contained in:
parent
0a1bdd79da
commit
45c11664ae
@ -50,13 +50,13 @@ def call_asciidoc(src, dst):
|
|||||||
args.append(src)
|
args.append(src)
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(args)
|
subprocess.check_call(args)
|
||||||
except (subprocess.CalledProcessError, OSError) as e:
|
|
||||||
utils.print_col(str(e), 'red')
|
|
||||||
sys.exit(1)
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
utils.print_col("asciidoc needs to be installed to use this script!",
|
utils.print_col("asciidoc needs to be installed to use this script!",
|
||||||
'red')
|
'red')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
except (subprocess.CalledProcessError, OSError) as e:
|
||||||
|
utils.print_col(str(e), 'red')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def main(colors=False):
|
def main(colors=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user