fix hd seek

This commit is contained in:
Christoph J. Scherr 2023-09-15 13:10:15 +02:00
parent 3465c56c2e
commit a80c723a32
2 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ This is a list of tasks that would be cool to add.
- (x) Install script to system - (x) Install script to system
Using update-alternatives is the most handy Using update-alternatives is the most handy
- (x) Accept input from stdin when no file is given - (x) Accept input from stdin when no file is given
- ( ) Process only first N or last N Bytes
- ( ) Write a complete task for this stuff - ( ) Write a complete task for this stuff
*** Networking *** Networking
- ( ) Mini curl - ( ) Mini curl

View File

@ -80,6 +80,7 @@ def main():
try: try:
file.seek(0, os.SEEK_END) file.seek(0, os.SEEK_END)
flen = file.tell() flen = file.tell()
file.seek(0, os.SEEK_SET)
except io.UnsupportedOperation: except io.UnsupportedOperation:
# some kinds of "files" like stdin are not seekable # some kinds of "files" like stdin are not seekable
flen = 0 flen = 0