def getImageNames(self): if not self.archHandle: raise ValueError() self.archFiles = self.archHandle.getFileList() ret = [] for item in self.archFiles: if nt.isProbablyImage(item): ret.append(item) if not ret: raise ValueError("No Images in archive! \n Archive contents = %s" % "\n ".join(self.archFiles)) return ret
def getImageNames(self): if not self.archHandle: raise ValueError() ret = [] fcnt = 0 for item in self.archHandle.getFileList(): fcnt += 1 if nt.isProbablyImage(item): ret.append(item) if not ret: raise ValueError("No Images in archive (but %s files)! \n Archive contents = %s" % (fcnt, "\n ".join(self.archHandle.getFileList()))) return ret