summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-03-02 11:03:48 +0000
committerGerrit Code Review <review@openstack.org>2018-03-02 11:03:48 +0000
commit1fecc3325ac72b8545403cb34ddf7fbba90f416d (patch)
tree6497ccbafc66e89377514476c90113b79abd21fe
parent67fa1edf411f4cb052bbe53fa155caa0da3341d6 (diff)
parent158d161cba28845ee7da842c84af372b25cc01a4 (diff)
Merge "Py3 compat changes for diff view"
-rw-r--r--gertty/view/diff.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gertty/view/diff.py b/gertty/view/diff.py
index 558ef9d..10edcc9 100644
--- a/gertty/view/diff.py
+++ b/gertty/view/diff.py
@@ -324,11 +324,13 @@ class BaseDiffView(urwid.WidgetWrap, mywid.Searchable):
324 # Handle comments that landed outside our default diff context 324 # Handle comments that landed outside our default diff context
325 lastlen = 0 325 lastlen = 0
326 while comment_lists: 326 while comment_lists:
327 if len(comment_lists.keys()) == lastlen: 327 comment_lists_keys = list(comment_lists.keys())
328 if len(comment_lists_keys) == lastlen:
328 self.log.error("Unable to display all comments: %s" % comment_lists) 329 self.log.error("Unable to display all comments: %s" % comment_lists)
329 return 330 return
330 lastlen = len(comment_lists.keys()) 331 comment_lists_keys = list(comment_lists.keys())
331 key = comment_lists.keys()[0] 332 lastlen = len(comment_lists_keys)
333 key = comment_lists_keys[0]
332 kind, lineno, path = key.split('-', 2) 334 kind, lineno, path = key.split('-', 2)
333 lineno = int(lineno) 335 lineno = int(lineno)
334 if kind.startswith('old'): 336 if kind.startswith('old'):