Enter a description of the change.
Add back support for python 2.4.
Looks like a few slaves haven't been updated yet.
TBR=bradnelson
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3338017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58820 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 9d14bd2..122e81a 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -298,10 +298,13 @@
"""Thread-safe."""
self.stdout.write(out)
should_flush = False
- with self.lock:
+ self.lock.acquire()
+ try:
if (time.time() - self.last_flushed_at) > self.delay:
should_flush = True
self.last_flushed_at = time.time()
+ finally:
+ self.lock.release()
if should_flush:
self.stdout.flush()