add pcu_name to pcufailed_notice
[monitor.git] / monitor / wrapper / plc.py
index b681d55..62de999 100644 (file)
@@ -71,7 +71,7 @@ class PLC:
 
                try:
                        return lambda *params : method(self.auth, *params)
-               except ProtocolError:
+               except xmlrpclib.ProtocolError:
                        traceback.print_exc()
                        global_error_count += 1
                        if global_error_count >= 10:
@@ -142,8 +142,11 @@ def getNodeAPI(session):
        nodeauth = Auth(session=session)
        return PLC(nodeauth.auth, auth.server)
 
-def getAuthAPI():
-       return PLC(auth.auth, auth.server)
+def getAuthAPI(url=None):
+       if url:
+               return PLC(auth.auth, url)
+       else:
+               return PLC(auth.auth, auth.server)
 
 def getCachedAuthAPI():
        return CachedPLC(auth.auth, auth.server)