From d79bcc082c7f65dda373fde379305860d682d1cc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 19 Apr 2011 10:58:01 -0400 Subject: [PATCH] Make matplotlib display errors nonfatal. --- pypiezo/afm.py | 2 +- pypiezo/base.py | 2 +- pypiezo/surface.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.26.2