From b7997cef105b06a1b14e44bd3e5cc382b9f1ee46 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 11 Aug 2016 09:26:29 +0300 Subject: Log GADirectory object lifetimes --- obnamlib/fmt_ga/dirobj.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/obnamlib/fmt_ga/dirobj.py b/obnamlib/fmt_ga/dirobj.py index 64c333d1..03e0cc65 100644 --- a/obnamlib/fmt_ga/dirobj.py +++ b/obnamlib/fmt_ga/dirobj.py @@ -53,12 +53,16 @@ _key_from_short = dict((v, k) for k, v in _short_key_names.items()) class GADirectory(object): def __init__(self): + obnamlib.object_created(self) self._dict = { 'metadata': {}, 'subdirs': {}, } self._mutable = True + def __del__(self): + obnamlib.object_deleted(self, self._dict) + def is_mutable(self): return self._mutable -- cgit v1.2.1