Kaynağa Gözat

Fix StopIteration exception during repo {sync,status}

If we run out of entries next() will throw StopIteration.

Signed-off-by: Shawn O. Pearce <sop@google.com>
Shawn O. Pearce 17 yıl önce
ebeveyn
işleme
02dbb6d120
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      project.py

+ 5 - 2
project.py

@@ -920,8 +920,11 @@ class Project(object):
         if out:
           out = iter(out[:-1].split('\0'))
           while out:
-            info = out.next()
-            path = out.next()
+            try:
+              info = out.next()
+              path = out.next()
+            except StopIteration:
+              break
 
             class _Info(object):
               def __init__(self, path, omode, nmode, oid, nid, state):