File tree 1 file changed +13
-12
lines changed 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -119,19 +119,20 @@ def flush_figures():
119
119
if not show ._draw_called :
120
120
return
121
121
122
- if InlineBackend .instance ().close_figures :
123
- # ignore the tracking, just draw and close all figures
124
- try :
125
- return show (True )
126
- except Exception as e :
127
- # safely show traceback if in IPython, else raise
128
- ip = get_ipython ()
129
- if ip is None :
130
- raise e
131
- else :
132
- ip .showtraceback ()
133
- return
134
122
try :
123
+ if InlineBackend .instance ().close_figures :
124
+ # ignore the tracking, just draw and close all figures
125
+ try :
126
+ return show (True )
127
+ except Exception as e :
128
+ # safely show traceback if in IPython, else raise
129
+ ip = get_ipython ()
130
+ if ip is None :
131
+ raise e
132
+ else :
133
+ ip .showtraceback ()
134
+ return
135
+
135
136
# exclude any figures that were closed:
136
137
active = set ([fm .canvas .figure for fm in Gcf .get_all_fig_managers ()])
137
138
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