mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +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
|
import tempfile, subprocess, re
|
||||||
|
|
||||||
tmpfile = None
|
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
|
print request
|
||||||
|
except:
|
||||||
|
print request.__str__().encode('ascii', 'xmlcharrefreplace')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msg = '(a)ccept/(d)ecline/(r)evoke/(c)ancel > '
|
msg = '(a)ccept/(d)ecline/(r)evoke/(c)ancel > '
|
||||||
if request.actions[0].type == 'submit':
|
if request.actions[0].type == 'submit':
|
||||||
|
Loading…
Reference in New Issue
Block a user