1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-26 00:12:29 +01:00

Fix possible crash when handling D-Bus exceptions in monitor.py

This commit is contained in:
Dan O'Reilly
2009-02-11 21:01:12 -05:00
parent bae95355d7
commit 8127dc194b

View File

@@ -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