mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
and again
This commit is contained in:
parent
069e3e69b4
commit
9015530224
@ -17,10 +17,13 @@ class ReadFileWithProgressReporting: # {{{
|
|||||||
def __init__(self, path, mode='rb'):
|
def __init__(self, path, mode='rb'):
|
||||||
self.fobj = open(path, mode)
|
self.fobj = open(path, mode)
|
||||||
self.fobj.seek(0, os.SEEK_END)
|
self.fobj.seek(0, os.SEEK_END)
|
||||||
self._total = self.tell()
|
self._total = self.fobj.tell()
|
||||||
self.fobj.seek(0)
|
self.fobj.seek(0)
|
||||||
self.start_time = time.time()
|
self.start_time = time.time()
|
||||||
|
|
||||||
|
def tell(self, *a):
|
||||||
|
return self.fobj.tell(*a)
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user