]> arthur.barton.de Git - bup.git/blobdiff - cmd/split-cmd.py
Don't have ./bup depend on main.py, etc.
[bup.git] / cmd / split-cmd.py
index 5ae3c0d991ab8bc322752c8d8a4dc757ba2e1d50..70daf7c688258b7da31c34a2bac83015c3316fac 100755 (executable)
@@ -108,7 +108,7 @@ if opt.git_ids:
         def __init__(self, it):
             self.it = iter(it)
         def read(self, size):
-            v = next(self.it)
+            v = next(self.it, None)
             return v or ''
     def read_ids():
         while 1:
@@ -119,7 +119,7 @@ if opt.git_ids:
                 line = line.strip()
             try:
                 it = cp.get(line.strip())
-                next(it)  # skip the file type
+                next(it, None)  # skip the file type
             except KeyError, e:
                 add_error('error: %s' % e)
                 continue