Commit f3f1a514dde5cd042585e05c4ad185d7c6daef60

Authored by Jürgen Knödlseder
1 parent 9a1b801f

Correct import exception

examples/show_butterfly.py
... ... @@ -25,7 +25,7 @@ try:
25 25 import matplotlib.pyplot as plt
26 26 plt.figure()
27 27 plt.close()
28   -except ImportError:
  28 +except ImportError, RuntimeError:
29 29 print('This script needs the "matplotlib" module')
30 30 sys.exit()
31 31  
... ...
examples/show_model.py
... ... @@ -25,7 +25,7 @@ try:
25 25 import matplotlib.pyplot as plt
26 26 plt.figure()
27 27 plt.close()
28   -except ImportError:
  28 +except ImportError, RuntimeError:
29 29 print('This script needs the "matplotlib" module')
30 30 sys.exit()
31 31  
... ...
examples/show_obs.py
... ... @@ -25,7 +25,7 @@ try:
25 25 import matplotlib.pyplot as plt
26 26 plt.figure()
27 27 plt.close()
28   -except ImportError:
  28 +except ImportError, RuntimeError:
29 29 print('This script needs the "matplotlib" module')
30 30 sys.exit()
31 31  
... ...
examples/show_pha.py
... ... @@ -26,7 +26,7 @@ try:
26 26 import matplotlib.pyplot as plt
27 27 plt.figure()
28 28 plt.close()
29   -except ImportError:
  29 +except ImportError, RuntimeError:
30 30 print('This script needs the "matplotlib" module')
31 31 sys.exit()
32 32  
... ...
examples/show_pull_evolution.py
... ... @@ -25,7 +25,7 @@ try:
25 25 import matplotlib.pyplot as plt
26 26 plt.figure()
27 27 plt.close()
28   -except ImportError:
  28 +except ImportError, RuntimeError:
29 29 print('This script needs the "matplotlib" module')
30 30 sys.exit()
31 31 try:
... ...
examples/show_pull_histogram.py
... ... @@ -26,7 +26,7 @@ try:
26 26 import matplotlib.mlab as mlab
27 27 plt.figure()
28 28 plt.close()
29   -except ImportError:
  29 +except ImportError, RuntimeError:
30 30 print('This script needs the "matplotlib" module')
31 31 sys.exit()
32 32 try:
... ...
examples/show_response.py
... ... @@ -26,7 +26,7 @@ try:
26 26 import matplotlib.pyplot as plt
27 27 plt.figure()
28 28 plt.close()
29   -except ImportError:
  29 +except ImportError, RuntimeError:
30 30 print('This script needs the "matplotlib" module')
31 31 sys.exit()
32 32  
... ...
examples/show_sensitivity.py
... ... @@ -26,7 +26,7 @@ try:
26 26 import matplotlib.pyplot as plt
27 27 plt.figure()
28 28 plt.close()
29   -except ImportError:
  29 +except ImportError, RuntimeError:
30 30 print('This script needs the "matplotlib" module')
31 31 sys.exit()
32 32  
... ...
examples/show_spectrum.py
... ... @@ -25,7 +25,7 @@ try:
25 25 import matplotlib.pyplot as plt
26 26 plt.figure()
27 27 plt.close()
28   -except ImportError:
  28 +except ImportError, RuntimeError:
29 29 print('This script needs the "matplotlib" module')
30 30 sys.exit()
31 31  
... ...
examples/show_ts_distribution.py
... ... @@ -26,7 +26,7 @@ try:
26 26 import matplotlib.pyplot as plt
27 27 plt.figure()
28 28 plt.close()
29   -except ImportError:
  29 +except ImportError, RuntimeError:
30 30 print('This script needs the "matplotlib" module')
31 31 sys.exit()
32 32 try:
... ...