summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-12 16:21:37 +0300
committerLars Wirzenius <liw@liw.fi>2017-08-12 16:21:37 +0300
commit8acea37119d955e9f5e491c030765b48baea0bbb (patch)
tree2cbca9b481b45a0f5ad18f7962401677c392c787
parentb0632dca71834235230508e34ea9e8b462937e5b (diff)
downloadobnam-8acea37119d955e9f5e491c030765b48baea0bbb.tar.gz
Add: tracing to get_leaf, to aid debugging
-rw-r--r--obnamlib/fmt_ga/leaf_store.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/obnamlib/fmt_ga/leaf_store.py b/obnamlib/fmt_ga/leaf_store.py
index 7ba0f48a..e07434e1 100644
--- a/obnamlib/fmt_ga/leaf_store.py
+++ b/obnamlib/fmt_ga/leaf_store.py
@@ -74,6 +74,13 @@ class LeafStore(LeafStoreInterface): # pragma: no cover
def get_leaf(self, leaf_id):
tracing.trace('leaf_id %s', leaf_id)
+
+ blob = self._blob_store.get_blob(leaf_id)
+ if blob is None:
+ tracing.trace('no blob for leaf %r', leaf_id)
+ return None
+
+ tracing.trace('got blob for leaf %r', leaf_id)
leaf = obnamlib.CowLeaf()
leaf.from_dict(self._blob_store.get_blob(leaf_id))
return leaf