mirror of
https://github.com/gryf/wicd.git
synced 2026-03-27 22:43:33 +01:00
Fix possible crash when handling D-Bus exceptions in monitor.py
This commit is contained in:
@@ -54,6 +54,8 @@ def diewithdbus(func):
|
|||||||
self.__lost_dbus_count = 0
|
self.__lost_dbus_count = 0
|
||||||
return ret
|
return ret
|
||||||
except dbusmanager.DBusException:
|
except dbusmanager.DBusException:
|
||||||
|
if not hasattr(self, "__lost_dbus_count"):
|
||||||
|
self.__lost_dbus_count = 0
|
||||||
if self.__lost_dbus_count > 3:
|
if self.__lost_dbus_count > 3:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self.__lost_dbus_count += 1
|
self.__lost_dbus_count += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user