Merge pull request #1875 from coolo/fix_legal_utf8

legal: Fix crash on declining obsrq#670770
This commit is contained in:
Stephan Kulow 2019-02-27 08:56:05 +01:00 committed by GitHub
commit ca7c4fd221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ class LegalAuto(ReviewBot.ReviewBot):
self.message = 'declined'
print("unacceptable without user %d" % report.get('id'))
return None
comment = report.get('result', None)
comment = report.get('result', None).encode('utf-8')
if comment:
self.message = "@{} declined the legal report with the following comment: {}".format(
user, comment)