ref: 31742b8eeda65009c05365d85f16786b7ef81a2a
parent: 77d93706d25776a61d1a12485160fdb7541cc8f3
author: Paul Brossier <piem@piem.org>
date: Mon Sep 24 17:41:26 EDT 2018
python/lib/gen_external.py: always show errors
--- a/python/lib/gen_external.py
+++ b/python/lib/gen_external.py
@@ -105,10 +105,10 @@
assert proc, 'Proc was none'
cpp_output = proc.stdout.read()
err_output = proc.stderr.read()
+ if err_output:
+ print("Warning: preprocessor produced errors or warnings:\n%s" % err_output)
if not cpp_output:
raise Exception("preprocessor output is empty:\n%s" % err_output)
- elif err_output:
- print("Warning: preprocessor produced warnings:\n%s" % err_output)
if not isinstance(cpp_output, list):
cpp_output = [l.strip() for l in cpp_output.decode('utf8').split('\n')]