mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 09:56:13 +01:00
request_interactive_review() should not die with stragen unicode chars.
simple workaround.
This commit is contained in:
parent
430798536b
commit
83781a59b5
10
osc/core.py
10
osc/core.py
@ -4919,7 +4919,15 @@ def request_interactive_review(apiurl, request):
|
||||
import tempfile, subprocess, re
|
||||
|
||||
tmpfile = None
|
||||
print request
|
||||
|
||||
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