From f26c2160b5eae40ad2f3710b55bf8bb8f26f4933 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 28 Apr 2011 17:03:22 -0400 Subject: [PATCH] Don't warn about leaking halhelper --- src/virtManager/baseclass.py | 4 +++- src/virtManager/halhelper.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/virtManager/baseclass.py b/src/virtManager/baseclass.py index f67653496..129f850ec 100644 --- a/src/virtManager/baseclass.py +++ b/src/virtManager/baseclass.py @@ -37,6 +37,8 @@ def _safe_wrapper(func, *args): class vmmGObject(gobject.GObject): + _leak_check = True + @staticmethod def type_register(*args, **kwargs): gobject.type_register(*args, **kwargs) @@ -59,7 +61,7 @@ class vmmGObject(gobject.GObject): self.object_key = str(self) # Config might not be available if we error early in startup - if self.config: + if self.config and self._leak_check: self.config.add_object(self.object_key) def cleanup(self): diff --git a/src/virtManager/halhelper.py b/src/virtManager/halhelper.py index f97545288..44bb8ff6d 100644 --- a/src/virtManager/halhelper.py +++ b/src/virtManager/halhelper.py @@ -80,6 +80,9 @@ def is_net_bonding_slave(name_ignore, sysfspath): return False class vmmHalHelper(vmmGObject): + # Can't find a way to properly cleanup dbus signals + _leak_check = False + def __init__(self): vmmGObject.__init__(self)