From: Paul Brossier Date: Sun, 15 May 2016 14:51:59 +0000 (+0200) Subject: python/lib/moresetuptools.py: also catch WindowsError and other exceptions X-Git-Tag: 0.4.4~300^2~30 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=1772630a30b0a87da3cc5d5b77b38d3d119fb031;ds=sidebyside python/lib/moresetuptools.py: also catch WindowsError and other exceptions --- diff --git a/python/lib/moresetuptools.py b/python/lib/moresetuptools.py index 9d1add19..3ff5ebde 100644 --- a/python/lib/moresetuptools.py +++ b/python/lib/moresetuptools.py @@ -21,11 +21,11 @@ def add_packages(packages, ext=None, **kw): } for package in packages: + cmd = ['pkg-config', '--libs', '--cflags', package] try: - cmd = ['pkg-config', '--libs', '--cflags', package] tokens = subprocess.check_output(cmd) - except subprocess.CalledProcessError: - print("{:s} could not be found".format(package)) + except Exception as e: + print("Running \"{:s}\" failed: {:s}".format(' '.join(cmd), repr(e))) continue tokens = tokens.decode('utf8').split() for token in tokens: