diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-08-12 16:21:37 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-08-12 16:21:37 +0300 |
commit | 8acea37119d955e9f5e491c030765b48baea0bbb (patch) | |
tree | 2cbca9b481b45a0f5ad18f7962401677c392c787 | |
parent | b0632dca71834235230508e34ea9e8b462937e5b (diff) | |
download | obnam-8acea37119d955e9f5e491c030765b48baea0bbb.tar.gz |
Add: tracing to get_leaf, to aid debugging
-rw-r--r-- | obnamlib/fmt_ga/leaf_store.py | 7 |
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 |