X509 Extension Authority Information Access: URI of Registry
[sfa.git] / sfa / nitos / nitosshell.py
index 269e367..cf543f2 100644 (file)
@@ -1,9 +1,9 @@
 import sys
-import xmlrpclib
 import socket
 from urlparse import urlparse
 
 from sfa.util.sfalogging import logger
+from sfa.util.py23 import xmlrpc_client
 
 class NitosShell:
     """
@@ -26,14 +26,14 @@ class NitosShell:
     # use the 'capability' auth mechanism for higher performance when the PLC db is local    
     def __init__ ( self, config ) :
         url = config.SFA_NITOS_URL
-        self.proxy = xmlrpclib.Server(url, verbose = False, allow_none = True)
+        self.proxy = xmlrpc_client.ServerProxy(url, verbose = False, allow_none = True)
 
     def __getattr__(self, name):
         def func(*args, **kwds):
             actual_name=None
             if name in NitosShell.direct_calls: actual_name=name
             if not actual_name:
-                raise Exception, "Illegal method call %s for NITOS driver"%(name)
+                raise Exception("Illegal method call %s for NITOS driver"%(name))
             actual_name = "scheduler.server." + actual_name
             result=getattr(self.proxy, actual_name)(*args, **kwds)
             logger.debug('NitosShell %s (%s) returned ... '%(name,actual_name))