Commit 6bffb57e authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add missing tarfile to entries returned from tarfile...

parent 6425c3bf
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment