Skip to content

Commit

Permalink
@CodeRabbit: simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jkt628 committed Feb 6, 2025
1 parent a8a4db2 commit 935ab4b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions supervisor/dbus/network/setting/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,7 @@ def get_connection_from_interface(
wireless = {
CONF_ATTR_802_WIRELESS_ASSIGNED_MAC: Variant("s", "preserve"),
CONF_ATTR_802_WIRELESS_MODE: Variant(
"s",
interface.wifi.mode
if interface.wifi and interface.wifi.mode
else "infrastructure",
"s", (interface.wifi and interface.wifi.mode) or "infrastructure"
),
CONF_ATTR_802_WIRELESS_POWERSAVE: Variant("i", 1),
}
Expand Down

0 comments on commit 935ab4b

Please sign in to comment.