mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Implement tell() for filehandle iteration
This commit is contained in:
parent
efb8f49d42
commit
1cbe89feee
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue