There are two points in show_diff from aptdaemon/gtk3widgets.py where
line_number is not defined:
for line in difflib.unified_diff(from_lines, to_lines, lineterm=""):
if line.startswith("@@"):
match = re.match(self.REGEX_RANGE, line)
if not match:
continue
line_number = int(match.group("from_start"))
if line_number > 1:
insert_tagged_text(iter, self.ELLIPSIS, "default")
elif line.startswith("---") or line.startswith("+++"):
continue
elif line.startswith(" "):
line_number += 1
insert_tagged_text(iter, str(line_number), "number")
insert_tagged_text(iter, line, "default")
elif line.startswith("-"):
line_number += 1
insert_tagged_text(iter, str(line_number), "number")
insert_tagged_text(iter, line, "remove")
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1120322
Title:
update-manager crashed with UnboundLocalError in show_diff(): local
variable 'line_number' referenced before assignment
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1120322/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs