mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
Revert "Catch non-utf8 and convert it to utf8 inside create_submit_request() to prevent"
This reverts commit 518229067c
.
Doesn't solve your issue:
>>> unicode("!§").encode("utf8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1: ordinal not in range(128)
Fix pending...
This commit is contained in:
parent
518229067c
commit
95bc493b19
10
osc/core.py
10
osc/core.py
@ -3467,16 +3467,6 @@ def create_submit_request(apiurl,
|
||||
message=None, orev=None, src_update=None):
|
||||
|
||||
import cgi
|
||||
|
||||
try:
|
||||
unicode(message).decode('utf-8')
|
||||
except:
|
||||
# UnicodeDecodeError: 'utf8' codec can't decode bytes in position 365-367: invalid data
|
||||
# If it was not valid utf-8, we assume it was some latin-X, which needs to be
|
||||
# encoded in utf-8, before it goes into XML.
|
||||
# FIXME: Should this be handled earlier? Are there more places?
|
||||
message = unicode(message).encode('utf-8')
|
||||
|
||||
options_block=""
|
||||
if src_update:
|
||||
options_block="""<options><sourceupdate>%s</sourceupdate></options> """ % (src_update)
|
||||
|
Loading…
Reference in New Issue
Block a user