Exemplo n.º 1
0
    def _init_commands(self, protocol):
        """
        Execute any initial commands specified.

        :param protocol: A Protocol instance (e.g. action) to which to write
        the commands.
        """
        if not self.initialized:
            log.msg('Not initialized, sending init commands', debug=True)
            for next_init in self.init_commands:
                log.msg('Sending: %r' % next_init, debug=True)
                protocol.write(next_init + '\r\n')
            else:
                self.initialized = True
Exemplo n.º 2
0
    def _init_commands(self, protocol):
        """
        Execute any initial commands specified.

        :param protocol: A Protocol instance (e.g. action) to which to write
        the commands.
        """
        if not self.initialized:
            log.msg('Not initialized, sending init commands', debug=True)
            for next_init in self.init_commands:
                log.msg('Sending: %r' % next_init, debug=True)
                protocol.write(next_init + '\r\n')
            else:
                self.initialized = True
Exemplo n.º 3
0
 def writer(protocol, fileInfo):
     protocol.write("%s\r\n" % fileInfo[6])
Exemplo n.º 4
0
 def writer(protocol, fileInfo):
     stat, thing, user, group, size, date, name = fileInfo
     format = "%s    4 %8s %8s %8d Nov 18 22:00 %s\r\n"
     protocol.write(format % (modeToString(stat), user, group, size, name))