示例#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
示例#2
0
文件: IRCBot.py 项目: jesopo/bitbot
 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
示例#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