commit e519e7b9a814705bd1f408223506659c66922125 Author: Till Maas opensource@till.name Date: Tue Mar 29 20:04:10 2016 +0200
Fix UnicodeDecode error with bug.summary
pkgdb2client/utils.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) --- diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py index ab0a8b0..ae8e152 100644 --- a/pkgdb2client/utils.py +++ b/pkgdb2client/utils.py @@ -256,13 +256,16 @@ def check_package_creation(info, bugid, pkgdbclient, requester): expected = 'Review Request: {0} - {1}'.format( info['pkg_name'], info['pkg_summary'].encode('utf-8'))
- if bug.summary == expected: + # bug.summary is a unicode object + bug_summary = bug.summary.encode('utf-8') + + if bug_summary == expected: messages["good"].append("Summary of bug {0} is: {1}".format( - bugid, bug.summary)) + bugid, bug_summary)) else: messages["bad"].append( 'The bug title does not fit the expected one\n' - ' exp: "{0}" vs obs: "{1}"'.format(expected, bug.summary)) + ' exp: "{0}" vs obs: "{1}"'.format(expected, bug_summary))
if bug.component != 'Package Review': messages["bad"].append(
packagedb-cli-commits@lists.stg.fedorahosted.org