def close(self): self.capture_python_logging(False) for logitem in self._loglist: for m in logitem[1]: m.close() super().close() maybe_remove(self._log_socket)
def _open(self): name = self._fifoname maybe_remove(name) if not os.path.exists(name): os.mkfifo(name) if not stat.S_ISFIFO(os.stat(name).st_mode): raise TypeError("File is not a fifo: " + str(name)) os.chmod(name, 0o777) return open(os.open(name, os.O_RDWR|os.O_NONBLOCK))
def _open(self): name = self._fifoname maybe_remove(name) if not os.path.exists(name): os.mkfifo(name) if not stat.S_ISFIFO(os.stat(name).st_mode): raise TypeError("File is not a fifo: " + str(name)) os.chmod(name, 0o777) return open(os.open(name, os.O_RDWR | os.O_NONBLOCK))
def close(self): super().close() if not (self.is_client or self._socket_name.startswith('@')): maybe_remove(self._socket_name)
def close(self): super().close() maybe_remove(CHAP_FIFO) if self._iserve: self._iserve.close()
def close(self): super().close() maybe_remove(CHAP_SOCK)
def _create_server(self): maybe_remove(CHAP_SOCK) return asyncio.get_event_loop().create_unix_server(CommandProtocol.buildProtocol(self, interactive=True), path=CHAP_SOCK)
def _create_server(self): maybe_remove(CHAP_SOCK) return asyncio.get_event_loop().create_unix_server( CommandProtocol.buildProtocol(self, interactive=True), path=CHAP_SOCK)