projects
/
FFT-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27f87d1
)
FFT_tools: Catch RuntimeErrors when importing matplotlib
master
author
W. Trevor King
<wking@tremily.us>
Tue, 15 Jan 2013 16:08:56 +0000
(11:08 -0500)
committer
W. Trevor King
<wking@tremily.us>
Tue, 15 Jan 2013 16:08:56 +0000
(11:08 -0500)
For example, if your default backend is GTKAgg, but you don't have
$DISPLAY set, you can get:
RuntimeError: could not create GdkCursor object
FFT_tools.py
patch
|
blob
|
history
diff --git
a/FFT_tools.py
b/FFT_tools.py
index e85e430272f1c37875b941f312212c943bb38646..e6d058cc178416892a8425bcc05cc67b36d7aeb7 100644
(file)
--- a/
FFT_tools.py
+++ b/
FFT_tools.py
@@
-32,7
+32,7
@@
import unittest as _unittest
import numpy as _numpy
try:
import matplotlib.pyplot as _pyplot
-except
ImportError
as e:
+except
(ImportError, RuntimeError)
as e:
_pyplot = None
_pyplot_import_error = e