diff --git a/apkdiff/apkdiff.py b/apkdiff/apkdiff.py index ff1cc4981..da19bf59d 100755 --- a/apkdiff/apkdiff.py +++ b/apkdiff/apkdiff.py @@ -35,10 +35,10 @@ class ApkDiff: return True def compareEntries(self, sourceZip, destinationZip): - sourceInfoList = filter(lambda sourceInfo: sourceInfo.filename not in self.IGNORE_FILES, sourceZip.infolist()) - destinationInfoList = filter(lambda destinationInfo: destinationInfo.filename not in self.IGNORE_FILES, destinationZip.infolist()) + sourceInfoList = list(filter(lambda sourceInfo: sourceInfo.filename not in self.IGNORE_FILES, sourceZip.infolist())) + destinationInfoList = list(filter(lambda destinationInfo: destinationInfo.filename not in self.IGNORE_FILES, destinationZip.infolist())) - if len(list(sourceInfoList)) != len(list(destinationInfoList)): + if len(sourceInfoList) != len(destinationInfoList): print("APK info lists of different length!") return False @@ -61,7 +61,7 @@ class ApkDiff: sourceChunk = sourceFile.read(1024) destinationChunk = destinationFile.read(1024) - while sourceChunk != "" or destinationChunk != "": + while sourceChunk != b"" or destinationChunk != b"": if sourceChunk != destinationChunk: return False