Commit dc06a868 authored by nasser@codeaurora.org's avatar nasser@codeaurora.org

Write the progress bar to stdout, not stderr

Requested-By: 's avatarPawel Hajdan Jr. <phajdan.jr@chromium.org>

Review URL: http://codereview.chromium.org/896006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@41586 0039d316-1c4b-4281-b951-d872f2087c98
parent 7080e942
......@@ -35,36 +35,36 @@ class Progress(object):
return
if self._total <= 0:
sys.stderr.write('\r%s: %d, ' % (
sys.stdout.write('\r%s: %d, ' % (
self._title,
self._done))
sys.stderr.flush()
sys.stdout.flush()
else:
p = (100 * self._done) / self._total
if self._lastp != p:
self._lastp = p
sys.stderr.write('\r%s: %3d%% (%d/%d) ' % (
sys.stdout.write('\r%s: %3d%% (%d/%d) ' % (
self._title,
p,
self._done,
self._total))
sys.stderr.flush()
sys.stdout.flush()
def end(self):
if not self._show:
return
if self._total <= 0:
sys.stderr.write('\r%s: %d, done. \n' % (
sys.stdout.write('\r%s: %d, done. \n' % (
self._title,
self._done))
sys.stderr.flush()
sys.stdout.flush()
else:
p = (100 * self._done) / self._total
sys.stderr.write('\r%s: %3d%% (%d/%d), done. \n' % (
sys.stdout.write('\r%s: %3d%% (%d/%d), done. \n' % (
self._title,
p,
self._done,
self._total))
sys.stderr.flush()
sys.stdout.flush()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment