From e98e04cb6bcf488164abd321af29ed5ee7aca30a Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Fri, 25 Jul 2014 00:28:06 +0000 Subject: [PATCH] Fix off-by-one error in gclient progress indicator. BUG=368673 R=iannucci@chromium.org,cmp@chromium.org Review URL: https://codereview.chromium.org/412403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285434 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gclient_utils.py b/gclient_utils.py index 9837cbb36..9c62a2a5b 100644 --- a/gclient_utils.py +++ b/gclient_utils.py @@ -797,9 +797,11 @@ class ExecutionQueue(object): try: self.queued.append(d) total = len(self.queued) + len(self.ran) + len(self.running) + if self.jobs == 1: + total += 1 logging.debug('enqueued(%s)' % d.name) if self.progress: - self.progress._total = total + 1 + self.progress._total = total self.progress.update(0) self.ready_cond.notifyAll() finally: