Browse files

pylab_not_importable: Catch all exceptions, not just RuntimeErrors.

This catches situations when `pylab` isn't installed or fails for
another reason like:

  ImportError: No module named backend_tkagg

Closes gh-2646.
  • Loading branch information...
1 parent 591e9b3 commit 60f6674b6b7fc0f4d61acf797d618e8f46dff00e @bfroehle committed Dec 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/lib/tests/
@@ -17,11 +17,11 @@
from IPython.testing import decorators
def pylab_not_importable():
- """Test if importing pylab fails with RuntimeError (true when having no display)"""
+ """Test if importing pylab fails. (For example, when having no display)"""
import pylab
return False
- except RuntimeError:
+ except:
return True
# Testing code begins

0 comments on commit 60f6674

Please sign in to comment.