mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix bug 725478 because we run a buggy Python released almost 5 years ago; r=tigerblood
This commit is contained in:
parent
e5a23e2884
commit
8e14fcd32b
@ -463,10 +463,14 @@ class XPCShellTests(object):
|
||||
failure.setAttribute("type", str(result["failure"]["type"]))
|
||||
failure.setAttribute("message", result["failure"]["message"])
|
||||
|
||||
# Lossy translation but required to not break CDATA.
|
||||
# Lossy translation but required to not break CDATA. Also, text could
|
||||
# be None and Python 2.5's minidom doesn't accept None. Later versions
|
||||
# do, however.
|
||||
cdata = result["failure"]["text"]
|
||||
if cdata is not None:
|
||||
cdata = cdata.replace("]]>", "]] >")
|
||||
if not isinstance(cdata, str):
|
||||
cdata = ""
|
||||
|
||||
cdata = cdata.replace("]]>", "]] >")
|
||||
text = doc.createCDATASection(cdata)
|
||||
failure.appendChild(text)
|
||||
testcase.appendChild(failure)
|
||||
|
Loading…
Reference in New Issue
Block a user