From 1772630a30b0a87da3cc5d5b77b38d3d119fb031 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 15 May 2016 16:51:59 +0200 Subject: [PATCH 1/1] python/lib/moresetuptools.py: also catch WindowsError and other exceptions --- python/lib/moresetuptools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: -- 2.11.0