Don't include deleted objects in objreg.dump_objects
This commit is contained in:
parent
a0b90e7bc2
commit
618e7650fe
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user