Exemplo n.º 1
0
 def __getattr__(self, name):
     allnames = dir(self)
     if allnames and name not in allnames:
         raise AttributeError(name)
     method = ServerProxy.__getattr__(self, name)
     # `method` has private __name, so pass it as extra arg to wrapper:
     return XMLRPCMethod(name, method, client=self)
Exemplo n.º 2
0
 def __dir__(self):
     try:
         return ServerProxy.__getattr__(self, 'system.listMethods')()
     except Fault as e: # Server doesn't provide method
         warn(str(e))
         return []