def _preenDescriptors(self): for fdMap in (self.readFdMap, self.writeFdMap): lst = fdMap.keys() for fd in lst: try: select(fd + 1, [fd], [fd], [fd], 0) except Exception: fdMap.pop(fd, None) SelectReactor._preenDescriptors(self)
def _preenDescriptors(self): for fdMap, lst in ((self.readFdMap, self.readFdMap.keys()), (self.writeFdMap.keys(), self.writeFdMap.keys())): for fd in lst: try: select(fd + 1, [fd], [fd], [fd], 0) except: try: fdMap.pop(fd) except IndexError: pass SelectReactor._preenDescriptors(self)
def _preenDescriptors(self): for fdMap, lst in ( (self.readFdMap, self.readFdMap.keys()), (self.writeFdMap.keys(), self.writeFdMap.keys()) ): for fd in lst: try: select(fd + 1, [fd], [fd], [fd], 0) except: try: fdMap.pop(fd) except IndexError: pass SelectReactor._preenDescriptors(self)