Don't include deleted objects in objreg.dump_objects

This commit is contained in:
Florian Bruhin 2016-10-30 23:25:08 +01:00
parent a0b90e7bc2
commit 618e7650fe

View File

@ -23,6 +23,7 @@
import collections
import functools
import sip
from PyQt5.QtCore import QObject, QTimer
from qutebrowser.utils import log
@ -143,7 +144,8 @@ class ObjectRegistry(collections.UserDict):
"""Dump all objects as a list of strings."""
lines = []
for name, obj in self.data.items():
lines.append("{}: {}".format(name, repr(obj)))
if not sip.isdeleted(obj):
lines.append("{}: {}".format(name, repr(obj)))
return lines