From 8acea37119d955e9f5e491c030765b48baea0bbb Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 12 Aug 2017 16:21:37 +0300 Subject: Add: tracing to get_leaf, to aid debugging --- obnamlib/fmt_ga/leaf_store.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'obnamlib/fmt_ga/leaf_store.py') 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 -- cgit v1.2.1