Skip to content
Snippets Groups Projects
Commit 6bffb57e authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add missing tarfile to entries returned from tarfile...

parent 6425c3bf
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ class TarReader:
mode='r|')
pass
for e in self.tarfile:
# For some reason tarfile is not set in entries...
e.tarfile = self.tarfile
yield e
# Keep memory consumption down
self.tarfile.members = []
......
......@@ -29,7 +29,7 @@ def reader(tar_reader):
for e in tar_reader:
print('R', e.size, e.name)
if e.isfile():
a = tar_reader.tarfile.extractfile(e).read()
a = e.tarfile.extractfile(e).read()
b = open(e.name, 'rb').read()
if a != b:
raise Exception('DIFFERS...', a, b)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment