summaryrefslogtreecommitdiff
path: root/scripts/asciidoc2html.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/asciidoc2html.py')
-rwxr-xr-xscripts/asciidoc2html.py11
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]