summaryrefslogtreecommitdiffstats
path: root/ipalib/rpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/rpc.py')
-rw-r--r--ipalib/rpc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index 5a1f9e1ed..938c30e64 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -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.