Added "allow_none" argument in "getClient()" functions ZTK-1.1
authorThierry Florac <tflorac@ulthar.net>
Fri, 24 May 2013 11:41:36 +0200
branchZTK-1.1
changeset 222 ac6fb60952c9
parent 221 4c954a53ac9c
child 223 85a03fd95686
Added "allow_none" argument in "getClient()" functions
src/ztfy/utils/protocol/xmlrpc.py
--- a/src/ztfy/utils/protocol/xmlrpc.py	Fri May 24 11:40:47 2013 +0200
+++ b/src/ztfy/utils/protocol/xmlrpc.py	Fri May 24 11:41:36 2013 +0200
@@ -175,19 +175,19 @@
     _http_connection_compat = TimeoutHTTPS
 
 
-def getClient(uri, credentials=(), verbose=False, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
+def getClient(uri, credentials=(), verbose=False, allow_none=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
     """Get an XML-RPC client which supports basic authentication"""
     if uri.startswith('https:'):
         transport = SecureXMLRPCCookieAuthTransport('Python XML-RPC Client/0.1 (ZTFY secure transport)', credentials, timeout=timeout)
     else:
         transport = XMLRPCCookieAuthTransport('Python XML-RPC Client/0.1 (ZTFY basic transport)', credentials, timeout=timeout)
-    return xmlrpclib.Server(uri, transport=transport, verbose=verbose)
+    return xmlrpclib.Server(uri, transport=transport, verbose=verbose, allow_none=allow_none)
 
 
-def getClientWithCookies(uri, credentials=(), verbose=False, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
+def getClientWithCookies(uri, credentials=(), verbose=False, allow_none=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
     """Get an XML-RPC client which supports authentication throught cookies"""
     if uri.startswith('https:'):
         transport = SecureXMLRPCCookieAuthTransport('Python XML-RPC Client/0.1 (ZTFY secure cookie transport)', credentials, cookielib.CookieJar(), timeout)
     else:
         transport = XMLRPCCookieAuthTransport('Python XML-RPC Client/0.1 (ZTFY secure cookie transport)', credentials, cookielib.CookieJar(), timeout)
-    return xmlrpclib.Server(uri, transport=transport, verbose=verbose)
+    return xmlrpclib.Server(uri, transport=transport, verbose=verbose, allow_none=allow_none)