diff --git a/bpython/curtsies.py b/bpython/curtsies.py index 139bbae3..5b57585e 100644 --- a/bpython/curtsies.py +++ b/bpython/curtsies.py @@ -108,10 +108,12 @@ def process_event_and_paint(self, e): self.scroll_offset += scrolled raise else: - array, cursor_pos = self.paint() - scrolled = self.window.render_to_terminal(array, cursor_pos) - self.scroll_offset += scrolled - + try: + array, cursor_pos = self.paint() + scrolled = self.window.render_to_terminal(array, cursor_pos) + self.scroll_offset += scrolled + except TypeError: + ... def mainloop(self, interactive=True, paste=None): if interactive: # Add custom help command