mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
request_interactive_review() should not die with stragen unicode chars.
simple workaround.
This commit is contained in:
parent
430798536b
commit
83781a59b5
@ -4919,7 +4919,15 @@ def request_interactive_review(apiurl, request):
|
||||
import tempfile, subprocess, re
|
||||
|
||||
tmpfile = None
|
||||
|
||||
try:
|
||||
# FIXME: print can fail with unicode chars in the string.
|
||||
# Here we fix the symptoms, not the cause.
|
||||
# UnicodeEncodeError: 'ascii' codec can't encode character u'\u2002' in position 309: ordinal not in range(128)
|
||||
print request
|
||||
except:
|
||||
print request.__str__().encode('ascii', 'xmlcharrefreplace')
|
||||
|
||||
try:
|
||||
msg = '(a)ccept/(d)ecline/(r)evoke/(c)ancel > '
|
||||
if request.actions[0].type == 'submit':
|
||||
|
Loading…
Reference in New Issue
Block a user