From 8127dc194b9290492d62d358db572b1fbe3623b0 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Wed, 11 Feb 2009 21:01:12 -0500 Subject: [PATCH] Fix possible crash when handling D-Bus exceptions in monitor.py --- wicd/monitor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wicd/monitor.py b/wicd/monitor.py index 55dbfa2..592ec53 100755 --- a/wicd/monitor.py +++ b/wicd/monitor.py @@ -54,6 +54,8 @@ def diewithdbus(func): self.__lost_dbus_count = 0 return ret except dbusmanager.DBusException: + if not hasattr(self, "__lost_dbus_count"): + self.__lost_dbus_count = 0 if self.__lost_dbus_count > 3: sys.exit(1) self.__lost_dbus_count += 1