mirror of
https://github.com/httpie/cli.git
synced 2025-01-23 13:58:45 +01:00
Cleanup
This commit is contained in:
parent
d17e02792b
commit
c63a92f9b7
@ -840,7 +840,7 @@ is being saved to a file.
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Connection: keep-alive
|
||||
Content-Disposition: attachment; filename=jkbr-httpie-0.4.1-20-g40bd8f6.tar.gz
|
||||
Content-Disposition: attachment; filename=jkbr-httpie-0.4.1-33-gfc4f70a.tar.gz
|
||||
Content-Length: 505530
|
||||
Content-Type: application/x-gzip
|
||||
Server: GitHub.com
|
||||
|
@ -244,8 +244,10 @@ class Download(object):
|
||||
)
|
||||
|
||||
self._progress_reporter.output.write(
|
||||
'Downloading %s to "%s"\n' % (
|
||||
self._progress.total_size_humanized,
|
||||
'Downloading %sto "%s"\n' % (
|
||||
(humanize_bytes(total_size) + ' '
|
||||
if total_size is not None
|
||||
else ''),
|
||||
self._output_file.name
|
||||
)
|
||||
)
|
||||
@ -284,14 +286,12 @@ class Progress(object):
|
||||
self.downloaded = 0
|
||||
self.total_size = None
|
||||
self.resumed_from = 0
|
||||
self.total_size_humanized = '?'
|
||||
self.time_started = None
|
||||
self.time_finished = None
|
||||
|
||||
def started(self, resumed_from=0, total_size=None):
|
||||
assert self.time_started is None
|
||||
if total_size is not None:
|
||||
self.total_size_humanized = humanize_bytes(total_size)
|
||||
self.total_size = total_size
|
||||
self.downloaded = self.resumed_from = resumed_from
|
||||
self.time_started = time()
|
||||
@ -367,7 +367,6 @@ class ProgressReporter(object):
|
||||
self._status_line = template.format(
|
||||
percentage=percentage,
|
||||
downloaded=humanize_bytes(downloaded),
|
||||
total=self.progress.total_size_humanized,
|
||||
speed=humanize_bytes(speed),
|
||||
eta=eta,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user