From f3f1a514dde5cd042585e05c4ad185d7c6daef60 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 2 Aug 2016 23:52:16 +0200 Subject: [PATCH] Correct import exception --- examples/show_butterfly.py | 2 +- examples/show_model.py | 2 +- examples/show_obs.py | 2 +- examples/show_pha.py | 2 +- examples/show_pull_evolution.py | 2 +- examples/show_pull_histogram.py | 2 +- examples/show_response.py | 2 +- examples/show_sensitivity.py | 2 +- examples/show_spectrum.py | 2 +- examples/show_ts_distribution.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/show_butterfly.py b/examples/show_butterfly.py index ca4f0c6..09af4d5 100755 --- a/examples/show_butterfly.py +++ b/examples/show_butterfly.py @@ -25,7 +25,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_model.py b/examples/show_model.py index 5cf0299..b3f0e70 100755 --- a/examples/show_model.py +++ b/examples/show_model.py @@ -25,7 +25,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_obs.py b/examples/show_obs.py index fde173b..4fbcbac 100755 --- a/examples/show_obs.py +++ b/examples/show_obs.py @@ -25,7 +25,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_pha.py b/examples/show_pha.py index df1f40d..afb34ae 100755 --- a/examples/show_pha.py +++ b/examples/show_pha.py @@ -26,7 +26,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_pull_evolution.py b/examples/show_pull_evolution.py index 669e1b0..6b5d008 100755 --- a/examples/show_pull_evolution.py +++ b/examples/show_pull_evolution.py @@ -25,7 +25,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() try: diff --git a/examples/show_pull_histogram.py b/examples/show_pull_histogram.py index 5369caf..ebe3aee 100755 --- a/examples/show_pull_histogram.py +++ b/examples/show_pull_histogram.py @@ -26,7 +26,7 @@ try: import matplotlib.mlab as mlab plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() try: diff --git a/examples/show_response.py b/examples/show_response.py index 464412e..eb7deda 100755 --- a/examples/show_response.py +++ b/examples/show_response.py @@ -26,7 +26,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_sensitivity.py b/examples/show_sensitivity.py index 4a339e1..58b29f0 100755 --- a/examples/show_sensitivity.py +++ b/examples/show_sensitivity.py @@ -26,7 +26,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_spectrum.py b/examples/show_spectrum.py index 8f57fe5..0003db6 100755 --- a/examples/show_spectrum.py +++ b/examples/show_spectrum.py @@ -25,7 +25,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() diff --git a/examples/show_ts_distribution.py b/examples/show_ts_distribution.py index 483b6b8..8c23c11 100755 --- a/examples/show_ts_distribution.py +++ b/examples/show_ts_distribution.py @@ -26,7 +26,7 @@ try: import matplotlib.pyplot as plt plt.figure() plt.close() -except ImportError: +except ImportError, RuntimeError: print('This script needs the "matplotlib" module') sys.exit() try: -- libgit2 0.21.4