Browse Source

Merge "Handle binary files in diffstat"

changes/91/391991/1
Jenkins 8 years ago committed by Gerrit Code Review
parent
commit
7898f63698
  1. 12
      gertty/view/change.py

12
gertty/view/change.py

@ -173,8 +173,16 @@ class RevisionRow(urwid.WidgetWrap):
total_added = 0
total_removed = 0
for added, removed, filename in stats:
total_added += int(added)
total_removed += int(removed)
try:
added = int(added)
except ValueError:
added = 0
try:
removed = int(removed)
except ValueError:
removed = 0
total_added += added
total_removed += removed
rows.append(urwid.Columns([urwid.Text(filename),
(10, urwid.Text('+%s, -%s' % (added, removed))),
]))

Loading…
Cancel
Save