Merge branch 'master' of ssh://git.onelab.eu/git/sfa
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 6 Oct 2010 07:56:02 +0000 (09:56 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 6 Oct 2010 07:56:02 +0000 (09:56 +0200)
sfa/util/namespace.py
sfa/util/xmlrpcprotocol.py

index fcc65ba..b920f00 100644 (file)
@@ -20,21 +20,21 @@ def hrn_to_pl_slicename(hrn):
     # remove any escaped no alpah numeric characters
     #hrn = re.sub('\\\[^a-zA-Z0-9]', '', hrn)
     # remove any escaped '.' (i.e. '\.')
-    hrn.replace('\\.', '')
+    hrn = hrn.replace('\\.', '')
     parts = hrn.split(".")
     return parts[-2] + "_" + parts[-1]
 
 # assuming hrn is the hrn of an authority, return the plc authority name
 def hrn_to_pl_authname(hrn):
     # remove any escaped '.' (i.e. '\.')
-    hrn.replace('\\.', '')
+    hrn = hrn.replace('\\.', '')
     parts = hrn.split(".")
     return parts[-1]
 
 # assuming hrn is the hrn of an authority, return the plc login_base
 def hrn_to_pl_login_base(hrn):
     # remove any escaped '.' (i.e. '\.')
-    hrn.replace('\\.', '')
+    hrn = hrn.replace('\\.', '')
     return hrn_to_pl_authname(hrn)
 
 def hostname_to_hrn(auth_hrn, login_base, hostname):
index d759973..afba6f3 100644 (file)
@@ -54,7 +54,7 @@ class XMLRPCServerProxy(xmlrpclib.ServerProxy):
         xmlrpclib.ServerProxy.__init__(self, url, transport, allow_none=allow_none, verbose=verbose)
 
     def __getattr__(self, attr):
-        if self.options.verbose:
+        if self.options and self.options.verbose:
             print "Calling xml-rpc method:", attr
         return xmlrpclib.ServerProxy.__getattr__(self, attr)