Fix exception handling in asciidoc2html.

This commit is contained in:
Florian Bruhin 2014-11-23 21:27:20 +01:00
parent 0a1bdd79da
commit 45c11664ae

View File

@ -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):