summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-12 16:22:06 +0300
committerLars Wirzenius <liw@liw.fi>2017-08-12 16:22:06 +0300
commit89f17eaeba7a26b821072221f9912a6c4f71e89b (patch)
treeb96dab0ab00cbd347298ce21d60357263bc7321f
parent8acea37119d955e9f5e491c030765b48baea0bbb (diff)
downloadobnam-89f17eaeba7a26b821072221f9912a6c4f71e89b.tar.gz
Fix: handle missing leaf in CowTree
-rw-r--r--obnamlib/fmt_ga/cowtree.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/obnamlib/fmt_ga/cowtree.py b/obnamlib/fmt_ga/cowtree.py
index f4be1ed9..281f4adb 100644
--- a/obnamlib/fmt_ga/cowtree.py
+++ b/obnamlib/fmt_ga/cowtree.py
@@ -72,9 +72,10 @@ class CowTree(object):
leaf_ids = self._leaf_list.leaves()
for leaf_id in leaf_ids:
leaf = self._store.get_leaf(leaf_id)
- for key in leaf.keys():
- if key not in delta_keys:
- yield key
+ if leaf:
+ for key in leaf.keys():
+ if key not in delta_keys:
+ yield key
def commit(self):
tracing.trace('start comitting')