File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -115,19 +115,20 @@ def flush_figures():
115
115
if not show ._draw_called :
116
116
return
117
117
118
- if InlineBackend .instance ().close_figures :
119
- # ignore the tracking, just draw and close all figures
120
- try :
121
- return show (True )
122
- except Exception as e :
123
- # safely show traceback if in IPython, else raise
124
- ip = get_ipython ()
125
- if ip is None :
126
- raise e
127
- else :
128
- ip .showtraceback ()
129
- return
130
118
try :
119
+ if InlineBackend .instance ().close_figures :
120
+ # ignore the tracking, just draw and close all figures
121
+ try :
122
+ return show (True )
123
+ except Exception as e :
124
+ # safely show traceback if in IPython, else raise
125
+ ip = get_ipython ()
126
+ if ip is None :
127
+ raise e
128
+ else :
129
+ ip .showtraceback ()
130
+ return
131
+
131
132
# exclude any figures that were closed:
132
133
active = set ([fm .canvas .figure for fm in Gcf .get_all_fig_managers ()])
133
134
for fig in [fig for fig in show ._to_draw if fig in active ]:
You can’t perform that action at this time.
0 commit comments