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)
|
||||
try:
|
||||
subprocess.check_call(args)
|
||||
except (subprocess.CalledProcessError, OSError) as e:
|
||||
utils.print_col(str(e), 'red')
|
||||
sys.exit(1)
|
||||
except FileNotFoundError:
|
||||
utils.print_col("asciidoc needs to be installed to use this script!",
|
||||
'red')
|
||||
sys.exit(1)
|
||||
except (subprocess.CalledProcessError, OSError) as e:
|
||||
utils.print_col(str(e), 'red')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main(colors=False):
|
||||
|
Loading…
Reference in New Issue
Block a user