diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-08-10 22:38:56 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-08-11 09:29:10 +0300 |
commit | 09d98ac780956faf653c1ebb133ede8857725e96 (patch) | |
tree | 7b1cd71f8aad58f4da8a23ada440883369c1f5fd | |
parent | aac1e7efba15f54148f44da712a80ff15b4d5178 (diff) | |
download | obnam-09d98ac780956faf653c1ebb133ede8857725e96.tar.gz |
Log DirectoryObjectCache object lifetimes
-rw-r--r-- | obnamlib/fmt_ga/tree.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/obnamlib/fmt_ga/tree.py b/obnamlib/fmt_ga/tree.py index 7801b847..8ee6c4ef 100644 --- a/obnamlib/fmt_ga/tree.py +++ b/obnamlib/fmt_ga/tree.py @@ -158,8 +158,17 @@ class GATree(object): class DirectoryObjectCache(object): def __init__(self): + obnamlib.object_created(self) self.clear() + def __del__(self): + obnamlib.object_deleted( + self, + { + key: self._objs[key].as_dict() + for key in self._objs + }) + def clear(self): self._objs = {} |