diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-12-12 09:51:22 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-12-12 09:51:22 +0100 |
commit | b63cdf19f4691b3dfcab1fbad97c7289be568a03 (patch) | |
tree | d83d8fc52a8e5c7b73e83cd4c7ba072000d95c4b | |
parent | 4c9050d4be4f813e79b71ade28c7d71920851ed0 (diff) | |
download | qutebrowser-b63cdf19f4691b3dfcab1fbad97c7289be568a03.tar.gz qutebrowser-b63cdf19f4691b3dfcab1fbad97c7289be568a03.zip |
scripts: Show asciidoc errors while discovering
-rwxr-xr-x | scripts/asciidoc2html.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index 1b904736d..291d48d5f 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -234,11 +234,16 @@ class AsciiDoc: for executable in ['asciidoc', 'asciidoc.py']: try: subprocess.run([executable, '--version'], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, + capture_output=True, + text=True, check=True) - except OSError: + except FileNotFoundError: pass + except OSError as e: + utils.print_error(f"While running {executable}: {e}") + except subprocess.CalledProcessError as e: + utils.print_error( + f"While running {executable}: {e}\n{e.stdout}\n{e.stderr}") else: return [executable] |