Fix a python3 w/o lxml issue with binary serialization in the soap protocol
This commit is contained in:
parent
ef71f6e392
commit
2f27d2b7fd
@ -199,6 +199,8 @@ class SoapEncoder(object):
|
|||||||
def binary_tosoap(self, datatype, tag, value):
|
def binary_tosoap(self, datatype, tag, value):
|
||||||
print(datatype, tag, value)
|
print(datatype, tag, value)
|
||||||
value = base64.encodestring(value) if value is not None else None
|
value = base64.encodestring(value) if value is not None else None
|
||||||
|
if six.PY3:
|
||||||
|
value = value.decode('ascii')
|
||||||
return self.make_soap_element(
|
return self.make_soap_element(
|
||||||
datatype.basetype, tag, value, 'xs:base64Binary'
|
datatype.basetype, tag, value, 'xs:base64Binary'
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user