We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
io.tell()
1 parent 486e9ab commit 255f5b7Copy full SHA for 255f5b7
kaitaistruct.py
@@ -99,10 +99,8 @@ def size(self):
99
io = self._io
100
# Remember our current position
101
cur_pos = io.tell()
102
- # Seek to the end of the File object
103
- io.seek(0, SEEK_END)
104
- # Remember position, which is equal to the full length
105
- full_size = io.tell()
+ # Seek to the end of the stream and remember the full length
+ full_size = io.seek(0, SEEK_END)
106
# Seek back to the current position
107
io.seek(cur_pos)
108
return full_size
0 commit comments