From 2f27d2b7fd64420877c105063d4c67c0c563edf6 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Fri, 25 Jan 2013 21:50:19 +0100 Subject: [PATCH] Fix a python3 w/o lxml issue with binary serialization in the soap protocol --- wsmeext/soap/protocol.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wsmeext/soap/protocol.py b/wsmeext/soap/protocol.py index 68275a5..ca65a81 100644 --- a/wsmeext/soap/protocol.py +++ b/wsmeext/soap/protocol.py @@ -199,6 +199,8 @@ class SoapEncoder(object): def binary_tosoap(self, datatype, tag, value): print(datatype, tag, value) value = base64.encodestring(value) if value is not None else None + if six.PY3: + value = value.decode('ascii') return self.make_soap_element( datatype.basetype, tag, value, 'xs:base64Binary' )