示例#1
0
 def set_xml_cloth(self, what):
     from spyne.protocol.cloth.to_cloth import ClothParserMixin
     cm = ClothParserMixin.from_xml_cloth(what)
     if cm._root_cloth is not None:
         self._xml_root_cloth = cm._root_cloth
     elif cm._cloth is not None:
         self._xml_cloth = cm._cloth
     else:
         raise Exception("%r is not a suitable cloth", what)
示例#2
0
文件: _base.py 项目: jstuyck/spyne
 def set_xml_cloth(self, what):
     from spyne.protocol.cloth.to_cloth import ClothParserMixin
     cm = ClothParserMixin.from_xml_cloth(what)
     if cm._root_cloth is not None:
         self._xml_root_cloth = cm._root_cloth
     elif cm._cloth is not None:
         self._xml_cloth = cm._cloth
     else:
         raise Exception("%r is not a suitable cloth", what)