def _cbSFTP(self, result):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     log.debug('setting clientHandle to be %s' % client)
     self.clientHandle.callback(client)
     log.debug('Created SFTP Client')
Exemplo n.º 2
0
 def _cbSFTP(self, result):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     log.debug('setting clientHandle to be %s' % client)
     self.clientHandle.callback(client)
     log.debug('Created SFTP Client')
Exemplo n.º 3
0
 def _cbSFTP(self, result):
     # great explanation here http://stackoverflow.com/questions/5195427/twisted-conch-filetransfer
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     #here we fire the _sftp Deferred with the reference to the client
     self.conn._sftp.callback(client)
     self.conn.transport.transport.setTcpNoDelay(1)
Exemplo n.º 4
0
    def _sendRequest(self, msg, data):
        """
        The conch implementation appears to have a bug in it. This ensures we will fail if
        the connection has been lost rather than strand the request deferred.
        """
        if not self.connected:
            return defer.fail(error.ConnectionLost())

        return FileTransferClient._sendRequest(self, msg, data)
Exemplo n.º 5
0
 def channelOpen(self, whatever):
     yield self.conn.sendRequest(self, 'subsystem', NS('sftp'), wantReply=True)
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     self.conn._sftp.callback(client)
Exemplo n.º 6
0
 def channelOpen(self, whatever):
     yield self.conn.sendRequest(self, 'subsystem', NS('sftp'), wantReply=True)
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     self.conn._sftp.callback(client)
Exemplo n.º 7
0
 def _cbSFTP(self, result):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     self.client = client
     self.conn['sftp'] = self
Exemplo n.º 8
0
 def _cbSFTP(self, result):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     self.conn._sftp.callback((self.conn.transport, client))
Exemplo n.º 9
0
 def _cbFTP(self, ignore):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     ACTIVE_CLIENTS.update({self.conn.transport.transport.addr: client})
     self.conn._sftp.callback(None)
Exemplo n.º 10
0
 def _cbSFTP(self, result):
     client = FileTransferClient()
     client.makeConnection(self)
     self.dataReceived = client.dataReceived
     self.conn._sftp.callback(client)