Exemplo n.º 1
0
 def __init__(self, name, check, with_error=None):
     Service.__init__(self, name)
     self._check = check
     self._with_error = set()
     for error in with_error:
         if isinstance(error, basestring):
             self._with_error.add(error)
         elif isinstance(error, type) and issubclass(error, Exception):
             self._with_error.add(error.__name__)
         else:
             raise TypeError(
                 "InverseCheck expects a list of exception classes; " "got a list with a %s" % type(error)
             )
Exemplo n.º 2
0
 def __init__(self, name, address, port):
     Service.__init__(self, name)
     self.address = address
     self.port = port