def enumFiles(self, dir): fileListCmd = self._fileListCmd % dir fileListStr = self.sendShellCommands(fileListCmd) with open('/tmp/filelist.txt', 'wb') as f: f.write(fileListStr.encode()) return FileList.parse(fileListStr, re.compile(self._fileListPattern))
def enumFiles(self, dir): fileListCmd = self._fileListCmd % dir fileListStr = self.sendShellCommands(fileListCmd) return FileList.parse(fileListStr, re.compile(self._fileListPattern))