Skip to content

Delay the fc-list warning by 5 seconds #7532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make sure TimeoutExpired is defined
  • Loading branch information
astrofrog committed Nov 29, 2016
commit b1bf847c67ecddb3363d18d78cbaf4b6739016ed
4 changes: 3 additions & 1 deletion lib/matplotlib/compat/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
else:
import subprocess

__all__ = ['Popen', 'PIPE', 'STDOUT', 'check_output', 'CalledProcessError']
__all__ = ['Popen', 'PIPE', 'STDOUT', 'check_output', 'CalledProcessError', 'TimeoutExpired']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be line-wrapped ❤️ pep8



if hasattr(subprocess, 'Popen'):
Expand All @@ -36,6 +36,7 @@
STDOUT = subprocess.STDOUT
CalledProcessError = subprocess.CalledProcessError
check_output = subprocess.check_output
TimeoutExpired = subprocess.TimeoutExpired
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work on python2 unless subprocess32 is installed.

Python 2.7.12 (default, Nov  7 2016, 11:55:55) 
[GCC 6.2.1 20160830] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.TimeoutExpired
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'TimeoutExpired'
>>> 

This looks like it is working on travis because subprocess32 in an install require (not a run-time require) so it is always getting installed on travis. I think that there is a way to install mpl such that this will fail.

else:
# In restricted environments (such as Google App Engine), these are
# non-existent. Replace them with dummy versions that always raise OSError.
Expand All @@ -49,3 +50,4 @@ def check_output(*args, **kwargs):
# There is no need to catch CalledProcessError. These stubs cannot raise
# it. None in an except clause will simply not match any exceptions.
CalledProcessError = None
TimeoutExpired = None