From: Paul Brossier Date: Mon, 24 Sep 2018 19:41:26 +0000 (+0200) Subject: python/lib/gen_external.py: always show errors X-Git-Tag: 0.4.8~100^2~12 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=31742b8eeda65009c05365d85f16786b7ef81a2a;p=aubio.git python/lib/gen_external.py: always show errors --- diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py index 6a36d451..76a34add 100644 --- a/python/lib/gen_external.py +++ b/python/lib/gen_external.py @@ -105,10 +105,10 @@ def get_c_declarations(header=header, usedouble=False): 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')]