History

python/lib/moresetuptools.py: also catch WindowsError and other exceptions

Paul Brossier committed 10 years ago

Commit 17726301 parent b1d37c01 file · +3 −3Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/moresetuptools.py+3−3
@@ -21,11 +21,11 @@ def add_packages(packages, ext=None, **kw): · 20 unmodified lines
2121 }
2222
2323 for package in packages:
24+ cmd = ['pkg-config', '--libs', '--cflags', package]
2425 try:
25− cmd = ['pkg-config', '--libs', '--cflags', package]
2626 tokens = subprocess.check_output(cmd)
27− except subprocess.CalledProcessError:
28− print("{:s} could not be found".format(package))
27+ except Exception as e:
28+ print("Running \"{:s}\" failed: {:s}".format(' '.join(cmd), repr(e)))
2929 continue
3030 tokens = tokens.decode('utf8').split()
3131 for token in tokens:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t