@@ -14,9 +14,8 @@ def fn_name(): return sys._getframe(1).f_code.co_name
14
14
from matplotlib .cbook import is_string_like , enumerate , True , False , onetrue
15
15
from matplotlib .font_manager import fontManager
16
16
17
- from matplotlib .backend_bases import \
18
- RendererBase , GraphicsContextBase , FigureManagerBase , FigureCanvasBase ,\
19
- NavigationToolbar2 , cursors , MplEvent
17
+ from matplotlib .backend_bases import RendererBase , GraphicsContextBase , \
18
+ FigureManagerBase , FigureCanvasBase , NavigationToolbar2 , cursors , MplEvent
20
19
from matplotlib ._matlab_helpers import Gcf
21
20
from matplotlib .figure import Figure
22
21
@@ -1541,6 +1540,7 @@ def get_filename_from_user (self):
1541
1540
1542
1541
def exception_handler (type , value , tb ):
1543
1542
"""Handle uncaught exceptions"""
1543
+ # type is of format - exceptions.IOError
1544
1544
# get the filename attribute if available (for IOError)
1545
1545
if hasattr (value , 'filename' ) and value .filename != None :
1546
1546
msg = value .filename + ': '
@@ -1550,7 +1550,7 @@ def exception_handler(type, value, tb):
1550
1550
msg += value .strerror
1551
1551
else :
1552
1552
msg = value
1553
-
1553
+
1554
1554
error_msg_gtk (msg )
1555
1555
1556
1556
sys .excepthook = exception_handler
0 commit comments