summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-08-11 09:26:29 +0300
committerLars Wirzenius <liw@liw.fi>2016-08-11 09:28:52 +0300
commitb7997cef105b06a1b14e44bd3e5cc382b9f1ee46 (patch)
tree02762a8e5bed8fb78d17cfa7540db814085ca64b
parent918ccf2855105475f6df7ae26c84ee80d252139e (diff)
downloadobnam-b7997cef105b06a1b14e44bd3e5cc382b9f1ee46.tar.gz
Log GADirectory object lifetimes
-rw-r--r--obnamlib/fmt_ga/dirobj.py4
1 files changed, 4 insertions, 0 deletions
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