diff options
author | Simon Schampijer <simon@laptop.org> | 2013-05-31 11:51:52 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-05-31 11:51:52 (GMT) |
commit | 951ebb574bff05b37810b4bfd779a57e8f29f230 (patch) | |
tree | 63e87c7199d0f97cb90223b80e57949f330c0b84 | |
parent | 4532cc87e5826a026a1848e26524fc96e07a670e (diff) |
get_text is only available in latest vte #676999 and pygobject/gobject-introspection #690041
Reviewed by Gonzalo O. and Daniel N.
-rw-r--r-- | terminal.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/terminal.py b/terminal.py index e3a0a91..de44e22 100644 --- a/terminal.py +++ b/terminal.py @@ -421,7 +421,12 @@ class TerminalActivity(activity.Activity): return True page = self._notebook.get_nth_page(i) - text, attr = page.vt.get_text(is_selected, None) + try: + # get_text is only available in latest vte #676999 + # and pygobject/gobject-introspection #690041 + text, attr_ = page.vt.get_text(is_selected, None) + except AttributeError: + text = '' scrollback_lines = text.split('\n') |