Print out actual exception when import fails. Python 2.5 compatible
This commit is contained in:
parent
19b46e8444
commit
5e6899a29e
|
@ -33,7 +33,7 @@ try:
|
|||
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
|
||||
from numpy import arange, cumsum
|
||||
from pylab import *
|
||||
except ImportError as inst:
|
||||
except ImportError, inst:
|
||||
print """Failed to load libs for graphing, graphing will not function. Please in
|
||||
stall numpy and matplotlib if you want to use graphs."""
|
||||
print """This is of no consequence for other parts of the program, e.g. import
|
||||
|
|
|
@ -37,7 +37,7 @@ try:
|
|||
# from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \
|
||||
# DayLocator, MONDAY, timezone
|
||||
|
||||
except ImportError as inst:
|
||||
except ImportError, inst:
|
||||
print """Failed to load numpy in Session Viewer"""
|
||||
print """This is of no consequence as the page is broken and only of interest to developers."""
|
||||
print "ImportError: %s" % inst.args
|
||||
|
|
Loading…
Reference in New Issue
Block a user