Also log start of upload
This commit is contained in:
parent
7dd20d4c79
commit
f7f4384876
@ -183,11 +183,12 @@ def run_sdist(args: Any) -> None:
|
|||||||
|
|
||||||
class ReadFileWithProgressReporting(io.FileIO): # {{{
|
class ReadFileWithProgressReporting(io.FileIO): # {{{
|
||||||
def __init__(self, path: str):
|
def __init__(self, path: str):
|
||||||
io.FileIO.__init__(self, path, 'rb')
|
super().__init__(path, 'rb')
|
||||||
self.seek(0, os.SEEK_END)
|
self.seek(0, os.SEEK_END)
|
||||||
self._total = self.tell()
|
self._total = self.tell()
|
||||||
self.seek(0)
|
self.seek(0)
|
||||||
self.start_time = time.monotonic()
|
self.start_time = time.monotonic()
|
||||||
|
print('Starting upload of:', os.path.basename(path), 'size:', self._total)
|
||||||
|
|
||||||
def __len__(self) -> int:
|
def __len__(self) -> int:
|
||||||
return self._total
|
return self._total
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user