X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Ffederica%2Ffdshell.py;h=1e7349c53a186110e6a3e2f0fed1f85192ceb797;hb=9194805e82cb8775d1257ba45b27a368aef9d8b7;hp=42ec030f198bbf05b276d53a95f65f2e9788a9cc;hpb=3d51e29695f79b143974f5cf7b2e104d89626ba4;p=sfa.git diff --git a/sfa/federica/fdshell.py b/sfa/federica/fdshell.py index 42ec030f..1e7349c5 100644 --- a/sfa/federica/fdshell.py +++ b/sfa/federica/fdshell.py @@ -1,6 +1,5 @@ -import xmlrpclib - from sfa.util.sfalogging import logger +from sfa.util.py23 import xmlrpc_client class FdShell: """ @@ -20,9 +19,9 @@ class FdShell: def __init__ ( self, config ) : url=config.SFA_FEDERICA_URL # xxx not sure if java xmlrpc has support for None - # self.proxy = xmlrpclib.Server(url, verbose = False, allow_none = True) + # self.proxy = xmlrpc_client.ServerProxy(url, verbose = False, allow_none = True) # xxx turn on verbosity - self.proxy = xmlrpclib.Server(url, verbose = True) + self.proxy = xmlrpc_client.ServerProxy(url, verbose = True) # xxx get credentials from the config ? # right now basic auth data goes into the URL @@ -30,7 +29,7 @@ class FdShell: def __getattr__(self, name): def func(*args, **kwds): if name not in FdShell.direct_calls: - raise Exception, "Illegal method call %s for FEDERICA driver"%(name) + raise Exception("Illegal method call %s for FEDERICA driver"%(name)) logger.info("Issuing %s args=%s kwds=%s to federica"%\ (name,args,kwds)) # result=getattr(self.proxy, "AggregateManager.%s"%name)(credential, *args, **kwds)