summaryrefslogtreecommitdiffstats
path: root/src/lib/Proxy.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-10-07 14:46:08 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-10-07 14:46:08 +0000
commiteac52c270b8b3b10e461bc46502b64c5f898bd7d (patch)
tree96da2e78af41305b445de23596b75bf754eedbbc /src/lib/Proxy.py
parente686d3b69600441e943c2913542e5477af528d87 (diff)
downloadbcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.gz
bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.bz2
bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.zip
Pylint/PEP 8 Code cleanups
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Proxy.py')
-rw-r--r--src/lib/Proxy.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/Proxy.py b/src/lib/Proxy.py
index fc71d212c..ea07fee47 100644
--- a/src/lib/Proxy.py
+++ b/src/lib/Proxy.py
@@ -160,17 +160,17 @@ class XMLRPCTransport(xmlrpclib.Transport):
return u.close()
-def ComponentProxy (url, user=None, password=None, key=None, cert=None, ca=None,
- allowedServerCNs=None, timeout=90):
-
+def ComponentProxy(url, user=None, password=None, key=None, cert=None, ca=None,
+ allowedServerCNs=None, timeout=90):
+
"""Constructs proxies to components.
-
+
Arguments:
component_name -- name of the component to connect to
-
+
Additional arguments are passed to the ServerProxy constructor.
"""
-
+
if user and password:
method, path = urlparse.urlparse(url)[:2]
newurl = "%s://%s:%s@%s" % (method, user, password, path)
@@ -178,4 +178,3 @@ def ComponentProxy (url, user=None, password=None, key=None, cert=None, ca=None,
newurl = url
ssl_trans = XMLRPCTransport(key, cert, ca, allowedServerCNs, timeout=timeout)
return xmlrpclib.ServerProxy(newurl, allow_none=True, transport=ssl_trans)
-