1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-27 15:13:14 +00:00

Version 4.0 - first draft for Python3 conversion

This commit is contained in:
Ciro Mattia Gonano
2013-11-14 15:49:46 +01:00
parent ddd223c2ec
commit d33c53b691
19 changed files with 210 additions and 191 deletions
+3 -3
View File
@@ -633,7 +633,7 @@ class RarFile(object):
def printdir(self):
"""Print archive file list to stdout."""
for f in self._info_list:
print(f.filename)
print((f.filename))
def extract(self, member, path=None, pwd=None):
"""Extract single file into current directory.
@@ -1138,7 +1138,7 @@ class RarFile(object):
if self._crc_check:
crc = crc32(cmt)
if crc < 0:
crc += (long(1) << 32)
crc += (int(1) << 32)
if crc != inf.CRC:
return None
@@ -1342,7 +1342,7 @@ class RarExtFile(RawIOBase):
raise BadRarFile("Failed the read enough data")
crc = self.CRC
if crc < 0:
crc += (long(1) << 32)
crc += (int(1) << 32)
if crc != self.inf.CRC:
raise BadRarFile("Corrupt file - CRC check failed: " + self.inf.filename)