diff options
| author | Daniel Sandler <dsandler@android.com> | 2011-04-04 11:15:17 -0400 |
|---|---|---|
| committer | Daniel Sandler <dsandler@android.com> | 2011-04-04 11:34:47 -0400 |
| commit | 723c5dc3d62fe07ba4faa17434870917ae87ce9d (patch) | |
| tree | 3ed0ea8b803d8dab2ae30ae6832d154be85108fb | |
| parent | e6a0eeb80d46a5e5e99ce17a46f93e83ee2782cc (diff) | |
| download | git-repo-723c5dc3d62fe07ba4faa17434870917ae87ce9d.tar.gz | |
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
| -rw-r--r-- | subcmds/sync.py | 4 |
1 files 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. | |||
| 218 | for project in projects: | 218 | for project in projects: |
| 219 | # Check for any errors before starting any new threads. | 219 | # Check for any errors before starting any new threads. |
| 220 | # ...we'll let existing threads finish, though. | 220 | # ...we'll let existing threads finish, though. |
| 221 | if err_event.is_set(): | 221 | if err_event.isSet(): |
| 222 | break | 222 | break |
| 223 | 223 | ||
| 224 | sem.acquire() | 224 | sem.acquire() |
| @@ -237,7 +237,7 @@ later is required to fix a server side protocol bug. | |||
| 237 | t.join() | 237 | t.join() |
| 238 | 238 | ||
| 239 | # If we saw an error, exit with code 1 so that other scripts can check. | 239 | # If we saw an error, exit with code 1 so that other scripts can check. |
| 240 | if err_event.is_set(): | 240 | if err_event.isSet(): |
| 241 | print >>sys.stderr, '\nerror: Exited sync due to fetch errors' | 241 | print >>sys.stderr, '\nerror: Exited sync due to fetch errors' |
| 242 | sys.exit(1) | 242 | sys.exit(1) |
| 243 | 243 | ||
