[output] write download progress indicator to stderr
This commit is contained in:
@@ -296,10 +296,10 @@ class TerminalOutput(NullOutput):
|
||||
bdl = util.format_value(bytes_downloaded)
|
||||
bps = util.format_value(bytes_per_second)
|
||||
if bytes_total is None:
|
||||
print("\r{:>7}B {:>7}B/s ".format(bdl, bps), end="")
|
||||
sys.stderr.write("\r{:>7}B {:>7}B/s ".format(bdl, bps))
|
||||
else:
|
||||
print("\r{:>3}% {:>7}B {:>7}B/s ".format(
|
||||
bytes_downloaded * 100 // bytes_total, bdl, bps), end="")
|
||||
sys.stderr.write("\r{:>3}% {:>7}B {:>7}B/s ".format(
|
||||
bytes_downloaded * 100 // bytes_total, bdl, bps))
|
||||
|
||||
|
||||
class ColorOutput(TerminalOutput):
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.19.3"
|
||||
__version__ = "1.20.0-dev"
|
||||
|
||||
Reference in New Issue
Block a user