From: Avery Pennarun Date: Thu, 3 Feb 2011 10:16:54 +0000 (-0800) Subject: client.py: avoid an exception when no new remote packs were generated. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d3347a619c8fe95242c6b5ba6e0606228c3ad5aa;p=packages%2Fb%2Fbup.git client.py: avoid an exception when no new remote packs were generated. 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 --- diff --git a/lib/bup/client.py b/lib/bup/client.py index f06d549..4a7c369 100644 --- a/lib/bup/client.py +++ b/lib/bup/client.py @@ -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)