# HG changeset patch # User Thierry Florac # Date 1369388496 -7200 # Node ID ac6fb60952c9f84781e63d70b08adb7eacc42b7e # Parent 4c954a53ac9c86b90b047ca4eb931cc8e507b586 Added "allow_none" argument in "getClient()" functions diff -r 4c954a53ac9c -r ac6fb60952c9 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)