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 c89db64

Browse filesBrowse files
committed
Fix RecursionError when closing nbAgg figures.
Previously, if a figure number was not in the list of managed figures, the destroy would be skipped, but now that only happens if a figure number is passed. If a figure manager is passed, then the destroy happens regardless. In nbAgg, this loops around closing/close_event and eventually calls destroy again, leading to a RecursionError.
1 parent 98dff87 commit c89db64
Copy full SHA for c89db64

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎lib/matplotlib/_pylab_helpers.py

Copy file name to clipboardExpand all lines: lib/matplotlib/_pylab_helpers.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def destroy(cls, num):
5757
manager = num
5858
if cls.figs.get(manager.num) is manager:
5959
cls.figs.pop(manager.num)
60+
else:
61+
return
6062
else:
6163
try:
6264
manager = cls.figs.pop(num)

0 commit comments

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