Also catch RuntimeError when importing matplotlib in slow_bend.py.
[blog.git] / posts / slow_bend / slow_bend.py
index 63cd2e05dcdf19a92bf5f5cc5bd16f786b3fe5c2..b62c3e183c6cb09150b0cf6e7afad881300ddf1e 100755 (executable)
@@ -37,7 +37,7 @@ import time as _time
 try:
     import numpy as _numpy
     from matplotlib import pyplot as _pyplot
-except ImportError, _matplotlib_import_error:
+except (ImportError, RuntimeError), _matplotlib_import_error:
     _pyplot = None
 
 import pycomedi.device as _pycomedi_device