Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0b604b3

Browse filesBrowse files
Tor ColvinTor Colvin
Tor Colvin
authored and
Tor Colvin
committed
Catch stderr as well as stdout
1 parent 6a5aa01 commit 0b604b3
Copy full SHA for 0b604b3

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ def get_fontconfig_fonts(fontext='ttf'):
269269

270270
fontfiles = {}
271271
try:
272-
pipe = subprocess.Popen(['fc-list', '--format=%{file}\\n'], stdout=subprocess.PIPE)
272+
pipe = subprocess.Popen(['fc-list', '--format=%{file}\\n'],
273+
stdout=subprocess.PIPE,
274+
stderr=subprocess.PIPE)
273275
output = pipe.communicate()[0]
274276
except (OSError, IOError):
275277
# Calling fc-list did not work, so we'll just return nothing
@@ -1298,7 +1300,8 @@ def fc_match(pattern, fontext):
12981300
try:
12991301
pipe = subprocess.Popen(
13001302
['fc-match', '-s', '--format=%{file}\\n', pattern],
1301-
stdout=subprocess.PIPE)
1303+
stdout=subprocess.PIPE,
1304+
stderr=subprocess.PIPE)
13021305
output = pipe.communicate()[0]
13031306
except (OSError, IOError):
13041307
return None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.