From: W. Trevor King Date: Tue, 19 Apr 2011 14:58:01 +0000 (-0400) Subject: Make matplotlib display errors nonfatal. X-Git-Tag: 0.5~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d79bcc082c7f65dda373fde379305860d682d1cc;p=pypiezo.git Make matplotlib display errors nonfatal. --- diff --git a/pypiezo/afm.py b/pypiezo/afm.py index d4beb13..49adb25 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -23,7 +23,7 @@ try: import matplotlib as _matplotlib import matplotlib.pyplot as _matplotlib_pyplot import time as _time # for timestamping lines on plots -except ImportError, e: +except (ImportError, RuntimeError), e: _matplotlib = None _matplotlib_import_error = e diff --git a/pypiezo/base.py b/pypiezo/base.py index 76bab25..4cffdba 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -27,7 +27,7 @@ try: import matplotlib as _matplotlib import matplotlib.pyplot as _matplotlib_pyplot import time as _time # for timestamping lines on plots -except ImportError, e: +except (ImportError, RuntimeError), e: _matplotlib = None _matplotlib_import_error = e diff --git a/pypiezo/surface.py b/pypiezo/surface.py index 79033c2..9c8d650 100644 --- a/pypiezo/surface.py +++ b/pypiezo/surface.py @@ -30,7 +30,7 @@ try: import matplotlib as _matplotlib import matplotlib.pyplot as _matplotlib_pyplot import time as _time # for timestamping lines on plots -except ImportError, e: +except (ImportError, RuntimeError), e: _matplotlib = None _matplotlib_import_error = e