diff options
Diffstat (limited to 'obnamlib/fmt_ga/tree.py')
-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 = {} |