Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 81d5a24

Browse filesBrowse files
committed
Merge pull request matplotlib#7052 from anntzer/catch-exceptions-in-qt5-draw-prevents-abort
FIX: Uncaught exns are fatal for PyQt5, so catch them.
1 parent 45243eb commit 81d5a24
Copy full SHA for 81d5a24

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎lib/matplotlib/backends/backend_qt5agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5agg.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
from matplotlib.externals import six
88

9-
import sys
109
import ctypes
10+
import sys
11+
import traceback
1112

1213
from matplotlib.figure import Figure
1314

@@ -178,6 +179,9 @@ def __draw_idle_agg(self, *args):
178179
try:
179180
FigureCanvasAgg.draw(self)
180181
self.update()
182+
except Exception:
183+
# Uncaught exceptions are fatal for PyQt5, so catch them instead.
184+
traceback.print_exc()
181185
finally:
182186
self._agg_draw_pending = False
183187

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.