From ebcccc4ae13f690220374497f932f58ec5fd7cfd Mon Sep 17 00:00:00 2001 From: Aylur Date: Sat, 28 Dec 2024 01:33:32 +0100 Subject: fix: examples without wifi --- examples/py/simple-bar/widget/Bar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/py/simple-bar/widget/Bar.py') diff --git a/examples/py/simple-bar/widget/Bar.py b/examples/py/simple-bar/widget/Bar.py index c6902b4..c2fa9e0 100644 --- a/examples/py/simple-bar/widget/Bar.py +++ b/examples/py/simple-bar/widget/Bar.py @@ -147,8 +147,9 @@ class Wifi(Astal.Icon): super().__init__() Astal.widget_set_class_names(self, ["Wifi"]) wifi = Network.get_default().get_wifi() - wifi.bind_property("ssid", self, "tooltip-text", SYNC) - wifi.bind_property("icon-name", self, "icon", SYNC) + if wifi: + wifi.bind_property("ssid", self, "tooltip-text", SYNC) + wifi.bind_property("icon-name", self, "icon", SYNC) class AudioSlider(Gtk.Box): -- cgit v1.2.3