From 723c5dc3d62fe07ba4faa17434870917ae87ce9d Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Mon, 4 Apr 2011 11:15:17 -0400 Subject: [PATCH] Fix parallel sync on python < 2.6. Event.isSet was renamed to is_set in 2.6, but we should use the earlier syntax to avoid breaking compatibility with older Python installations. Change-Id: I41888ed38df278191d7496c1a6eed15e881733f4 --- subcmds/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 4a544706..d941ea07 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -218,7 +218,7 @@ later is required to fix a server side protocol bug. for project in projects: # Check for any errors before starting any new threads. # ...we'll let existing threads finish, though. - if err_event.is_set(): + if err_event.isSet(): break sem.acquire() @@ -237,7 +237,7 @@ later is required to fix a server side protocol bug. t.join() # If we saw an error, exit with code 1 so that other scripts can check. - if err_event.is_set(): + if err_event.isSet(): print >>sys.stderr, '\nerror: Exited sync due to fetch errors' sys.exit(1)