[gen] method Mixin.xml: if the method result is already XML, it is not marshalled again.

This commit is contained in:
Gaetan Delannay 2013-10-09 21:23:49 +02:00
parent 6a83285e64
commit e031e5b138

View file

@ -498,6 +498,9 @@ class BaseMixin:
elif isinstance(methodRes, file):
res = methodRes.read()
methodRes.close()
elif isinstance(methodRes, basestring) and \
methodRes.startswith('<?xml'): # Already XML
return methodRes
else:
res = XmlMarshaller().marshall(methodRes, objectType='appy')
except Exception, e: