def ftp_STOR(self, path): host = self.transport.getPeer().host if host in CAMERAS and path.endswith('mp4_'): log.info("CAMERA {}, motion on".format(host)) CAMERAS[host]['motion'] = 'on' hafactory.doupdate() return FTP.ftp_STOR(self, path)
def ftp_STOR(self, path): FTP.sendLine(self, '125 Data connection already open, starting transfer') FTP.sendLine(self, '226 Transfer Complete.')
def lineReceived(self, line): self.logIt(line, True) ##print('command', line, True) FTP.lineReceived(self, line)
def connectionLost(self, reason): self.logIt('disconnected', True) ##print('disconnected', '', True) FTP.connectionLost(self, reason)
def connectionMade(self): self.logIt('connected', True) ##print('connected', '', True) FTP.connectionMade(self)
def lineReceived(self, line): self.__logInfo('command', line, True) FTP.lineReceived(self, line)
def connectionMade(self): self.__logInfo('connected', '', True) FTP.connectionMade(self)
def ftp_MKD(self, path): FTP.sendLine(self, '257 Folder created')
def ftp_RMD(self, path): FTP.sendLine(self, '250 Requested File Action Completed OK')
def ftp_RNTO(self, toName): FTP.sendLine(self, '250 Requested File Action Completed OK')
def ftp_RNFR(self, fromName): FTP.sendLine(self, '350 Requested file action pending further information.')
def connectionLost(self, reason): self.__logInfo('disconnected', '', True) FTP.connectionLost(self, reason)