提交 676881f2 编写于 作者: J Joerg Jaspert

Merge commit 'lamby/master' into merge

* commit 'lamby/master':
  Refactor Upload.package_info.
  Prefer interpolation over concatenation here.
  Add more spacing for reject messages/notes etc.
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
......@@ -287,19 +287,20 @@ class Upload(object):
self.pkg.reset()
def package_info(self):
msg = ''
if len(self.rejects) > 0:
msg += "Reject Reasons:\n"
msg += "\n".join(self.rejects)
"""
Format various messages from this Upload to send to the maintainer.
"""
if len(self.warnings) > 0:
msg += "Warnings:\n"
msg += "\n".join(self.warnings)
msgs = (
('Reject Reasons', self.rejects),
('Warnings', self.warnings),
('Notes', self.notes),
)
if len(self.notes) > 0:
msg += "Notes:\n"
msg += "\n".join(self.notes)
msg = ''
for title, messages in reasons:
if messages:
msg += '\n\n%s:\n%s' % (title, '\n'.join(messages))
return msg
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册