The crash is in the following code:
def check_hovering(self, x, y):
"""Check if the mouse is above a tagged link and if yes show
a hand cursor"""
_hovering = False
# get the iter at the mouse position
iter = self.get_iter_at_location(x, y)
# set _hovering if the iter has the tag "url"
tags = iter.get_tags()
The error is "AttributeError: '_ResultTuple' object has no attribute
'get_tags'".
self is an instance of a subclass of Gtk.TextView, which has a
`get_iter_at_location()` method that returns a tuple (bool, iterator):
http://lazka.github.io/pgi-
docs/#Gtk-3.0/classes/TextView.html#Gtk.TextView.get_iter_at_location
(I'm guessing PyGTK used to return just the iterator (or None), but with the
migration to PyGObject + gobject-introspection + GTK+ 3.x this changed.)
Suggested fix: iter = self.get_iter_at_location(x, y)
This buggy code pattern is also repeated in button_press_event.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1548425
Title:
update-manager crashed with AttributeError in check_hovering():
'tuple' object has no attribute 'get_tags'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1548425/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs