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 f38575e

Browse filesBrowse files
committed
let get_diff_image return None and deal with it downstream
1 parent edb5868 commit f38575e
Copy full SHA for f38575e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/matplotlib/backends/backend_webagg_core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_webagg_core.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ def get_diff_image(self):
236236
self._last_renderer, renderer)
237237
self._force_full = False
238238
self._png_is_old = False
239-
self.buff = buff
240-
return self.buff
239+
return buff
241240

242241
def get_renderer(self, cleared=None):
243242
# Mirrors super.get_renderer, but caches the old one
@@ -487,8 +486,9 @@ def handle_json(self, content):
487486
def refresh_all(self):
488487
if self.web_sockets:
489488
diff = self.canvas.get_diff_image()
490-
for s in self.web_sockets:
491-
s.send_binary(diff)
489+
if diff is not None:
490+
for s in self.web_sockets:
491+
s.send_binary(diff)
492492

493493
@classmethod
494494
def get_javascript(cls, stream=None):

0 commit comments

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