]> arthur.barton.de Git - bup.git/commitdiff
client.py: avoid an exception when no new remote packs were generated.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 3 Feb 2011 10:16:54 +0000 (02:16 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 3 Feb 2011 10:17:19 +0000 (02:17 -0800)
This is probably pretty rare, but it can happen if you needed to download a
remote index, and that index had *all* your objects, so we did end up
writing some objects to the remote server, but it didn't end up generating
any packs.  If that happened, we would try to return the contents of a
nonexistent variable.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/client.py

index f06d54965979d0c92ca36044af24a5c62c9668e3..4a7c3698b0d3dada94754c709996e1b616430874 100644 (file)
@@ -222,6 +222,7 @@ class Client:
         self.check_ok()
         if ob:
             self._busy = None
+        idx = None
         for idx in suggested:
             self.sync_index(idx)
         git.auto_midx(self.cachedir)