fix hd seek
This commit is contained in:
parent
3465c56c2e
commit
a80c723a32
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue