From f3da3efce15f6cbf15374c16c516e3587a3d6af2 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 11 Feb 2010 15:25:41 -0500 Subject: [PATCH] connection: Don't show harmless backtraces on conn disconnect --- src/virtManager/connection.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py index 0652cd6c9..1ff3e6bd2 100644 --- a/src/virtManager/connection.py +++ b/src/virtManager/connection.py @@ -1391,6 +1391,10 @@ class vmmConnection(gobject.GObject): updates need to go here to enable threading that doesn't block the app with long tick operations. """ + # Connection closed out from under us + if not self.vmm: + return + # Make sure device polling is setup if not self.netdev_initialized: self._init_netdev() @@ -1470,6 +1474,9 @@ class vmmConnection(gobject.GObject): return 1 def _recalculate_stats(self, now): + if self.vmm is None: + return + expected = self.config.get_stats_history_length() current = len(self.record) if current > expected: