Finished small tweaks to get new ipaserver.xmlrpc() mod_python handler working

This commit is contained in:
Jason Gerard DeRose
2009-01-30 23:46:51 -07:00
committed by Rob Crittenden
parent c2b0c80140
commit 3274577cd6
7 changed files with 40 additions and 25 deletions

View File

@@ -433,7 +433,6 @@ class Env(object):
self.script = path.abspath(sys.argv[0])
self.bin = path.dirname(self.script)
self.home = os.environ.get('HOME', None)
self.etc = path.join('/', 'etc', 'ipa')
self.dot_ipa = self._join('home', '.ipa')
self._merge(**overrides)
if 'in_tree' not in self:

View File

@@ -137,12 +137,14 @@ def xml_dumps(params, methodname=None, methodresponse=False, encoding='UTF-8'):
allow_none=True,
)
def decode_fault(e, encoding='UTF-8'):
assert isinstance(e, Fault)
if type(e.faultString) is str:
return Fault(e.faultCode, e.faultString.decode(encoding))
return e
def xml_loads(data, encoding='UTF-8'):
"""
Decode the XML-RPC packet in ``data``, transparently unwrapping its params.