mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
zerver/views/webhooks/github.py: Make exception string str.
Passing a unicode string to Exception can sometimes fail. Convert it to str to prevent that.
This commit is contained in:
committed by
Tim Abbott
parent
a32f83b182
commit
85cb3e6103
@@ -9,6 +9,8 @@ import logging
|
||||
import re
|
||||
import ujson
|
||||
|
||||
from zerver.lib.str_utils import force_str
|
||||
|
||||
COMMITS_IN_LIST_LIMIT = 10
|
||||
ZULIP_TEST_REPO_NAME = 'zulip-test'
|
||||
ZULIP_TEST_REPO_ID = 6893087
|
||||
@@ -118,7 +120,7 @@ def api_github_v2(user_profile, event, payload, branches, default_stream, commit
|
||||
content += u'\n\n~~~ quote\n%s\n~~~' % (comment['body'],)
|
||||
|
||||
else:
|
||||
raise UnknownEventType(u'Event %s is unknown and cannot be handled' % (event,))
|
||||
raise UnknownEventType(force_str(u'Event %s is unknown and cannot be handled' % (event,)))
|
||||
|
||||
return target_stream, subject, content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user