Example #1
0
 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)
Example #2
0
 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)
Example #3
0
    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))
Example #4
0
    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))
Example #5
0
 def close(self):
     super().close()
     if not (self.is_client or self._socket_name.startswith('@')):
         maybe_remove(self._socket_name)
Example #6
0
 def close(self):
     super().close()
     maybe_remove(CHAP_FIFO)
     if self._iserve:
         self._iserve.close()
Example #7
0
 def close(self):
     super().close()
     maybe_remove(CHAP_SOCK)
Example #8
0
 def _create_server(self):
     maybe_remove(CHAP_SOCK)
     return asyncio.get_event_loop().create_unix_server(CommandProtocol.buildProtocol(self, interactive=True), 
                                                        path=CHAP_SOCK)
Example #9
0
 def close(self):
     super().close()
     maybe_remove(CHAP_FIFO)
     if self._iserve:
         self._iserve.close()
Example #10
0
 def close(self):
     super().close()
     maybe_remove(CHAP_SOCK)
Example #11
0
 def _create_server(self):
     maybe_remove(CHAP_SOCK)
     return asyncio.get_event_loop().create_unix_server(
         CommandProtocol.buildProtocol(self, interactive=True),
         path=CHAP_SOCK)
Example #12
0
 def close(self):
     super().close()
     if not (self.is_client or self._socket_name.startswith('@')):
         maybe_remove(self._socket_name)