grep-merges: Use unicode string format for pretty output to deal with

non ascii encoding.
This commit is contained in:
James Page 2016-08-04 17:15:13 +01:00
parent f232d121d2
commit e56c0fce43
2 changed files with 5 additions and 1 deletions

4
debian/changelog vendored
View File

@ -7,6 +7,10 @@ ubuntu-dev-tools (0.158) UNRELEASED; urgency=medium
[ Colin Watson ]
* pbuilder-dist, ubuntu-build: Add s390x.
[ James Page ]
* grep-merges: Use unicode string format for pretty output to deal with
non ascii encoding.
-- Martin Pitt <martin.pitt@ubuntu.com> Fri, 13 May 2016 09:04:03 +0200
ubuntu-dev-tools (0.157) unstable; urgency=medium

View File

@ -65,7 +65,7 @@ def main():
author = merge['user']
if merge.get('uploader'):
uploader = '(%s)' % merge['uploader']
pretty_uploader = ' '.join((author, uploader)).strip()
pretty_uploader = u'{} {}'.format(author, uploader)
if (match is None or
match in package or match in author or match in uploader):
print '%s\t%s' % (package.encode("utf-8"), pretty_uploader.encode("utf-8"))