Exemplo n.º 1
0
 def connect(self, server: IRCServer.Server) -> bool:
     try:
         server.connect()
     except Exception as e:
         self.log.warn("Failed to connect to %s: %s", [str(server), str(e)])
         return False
     self.servers[server.fileno()] = server
     self.poll.register(server.fileno(), select.EPOLLOUT)
     return True
Exemplo n.º 2
0
 def connect(self, server: IRCServer.Server) -> bool:
     try:
         server.connect()
     except Exception as e:
         self.log.warn("Failed to connect to %s: %s",
             [str(server), str(e)])
         return False
     self.servers[server.fileno()] = server
     self.poll.register(server.fileno(), select.EPOLLOUT)
     return True
Exemplo n.º 3
0
 def connect(self, server: IRCServer.Server) -> bool:
     try:
         server.connect()
     except Exception as e:
         self.log.warn("Failed to connect to %s: %s", [str(server), str(e)])
         self.log.debug("Connection failure reason:", exc_info=True)
         return False
     self.servers[server.fileno()] = server
     self._read_poll.register(server.fileno(), select.POLLIN)
     return True