Implement tell() for filehandle iteration

This commit is contained in:
Erik Johnson 2018-06-18 16:23:35 -05:00
parent efb8f49d42
commit 1cbe89feee
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -189,7 +189,9 @@ class MockFH(object):
def __iter__(self):
while True:
try:
yield next(self.read_data)
ret = next(self.read_data)
self._loc += len(ret)
yield ret
except StopIteration:
break