summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-28 15:05:26 +0000
committerGerrit Code Review <review@openstack.org>2019-03-28 15:05:26 +0000
commit8c78bdc1eff5362d0b216c959d5bb362b2054c26 (patch)
tree408b8f97a18fb22081d7f39cbd34f386f865409b
parent64f2ba70767b45cd441fad7077439127290179dd (diff)
parent0e770f0df67c02c3949173f062359fbea2384505 (diff)
Merge "Fix change view display of inline comments in python3"HEADmaster
-rw-r--r--gertty/view/change.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gertty/view/change.py b/gertty/view/change.py
index e7bf373..a036be3 100644
--- a/gertty/view/change.py
+++ b/gertty/view/change.py
@@ -455,7 +455,7 @@ class ChangeMessageBox(mywid.HyperText):
455 for comment in comments: 455 for comment in comments:
456 path = comment.file.path 456 path = comment.file.path
457 inline_comments.setdefault(path, []) 457 inline_comments.setdefault(path, [])
458 inline_comments[path].append((comment.line, comment.message)) 458 inline_comments[path].append((comment.line or 0, comment.message))
459 for v in inline_comments.values(): 459 for v in inline_comments.values():
460 v.sort() 460 v.sort()
461 461
@@ -464,8 +464,8 @@ class ChangeMessageBox(mywid.HyperText):
464 for key, value in inline_comments.items(): 464 for key, value in inline_comments.items():
465 comment_text.append(('filename-inline-comment', u'%s' % key)) 465 comment_text.append(('filename-inline-comment', u'%s' % key))
466 for line, comment in value: 466 for line, comment in value:
467 if line is None: 467 if not line:
468 comment_text.append(u'\n %s' % comment) 468 comment_text.append(u'\n %s\n' % comment)
469 else: 469 else:
470 comment_text.append(u'\n %s: %s\n' % (line, comment)) 470 comment_text.append(u'\n %s: %s\n' % (line, comment))
471 471