diff options
| author | Shawn O. Pearce <sop@google.com> | 2008-10-21 13:59:08 -0700 | 
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2008-10-21 13:59:08 -0700 | 
| commit | 02dbb6d120e44ec22cc7051251984cfd618e74ce (patch) | |
| tree | e36cde295fc1f3f69eb67cfe6311ae820cd5e5d2 | |
| parent | 7542d664de7a9d42f64a81bc8c0b86bcbb384376 (diff) | |
| download | git-repo-02dbb6d120e44ec22cc7051251984cfd618e74ce.tar.gz | |
Fix StopIteration exception during repo {sync,status}v1.0.2
If we run out of entries next() will throw StopIteration.
Signed-off-by: Shawn O. Pearce <sop@google.com>
| -rw-r--r-- | project.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| @@ -920,8 +920,11 @@ class Project(object): | |||
| 920 | if out: | 920 | if out: | 
| 921 | out = iter(out[:-1].split('\0')) | 921 | out = iter(out[:-1].split('\0')) | 
| 922 | while out: | 922 | while out: | 
| 923 | info = out.next() | 923 | try: | 
| 924 | path = out.next() | 924 | info = out.next() | 
| 925 | path = out.next() | ||
| 926 | except StopIteration: | ||
| 927 | break | ||
| 925 | 928 | ||
| 926 | class _Info(object): | 929 | class _Info(object): | 
| 927 | def __init__(self, path, omode, nmode, oid, nid, state): | 930 | def __init__(self, path, omode, nmode, oid, nid, state): | 
