Fix KeyError in connectivity_enabled (#2336)

This commit is contained in:
Joakim Sørensen 2020-12-03 21:40:34 +01:00 committed by GitHub
parent 0c55bf20fc
commit 6245b6d823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ class NetworkManager(DBusInterface):
@property
def connectivity_enabled(self) -> bool:
"""Return if connectivity check is enabled."""
return self.properties[DBUS_ATTR_CONNECTION_ENABLED]
return self.properties.get(DBUS_ATTR_CONNECTION_ENABLED, False)
@dbus_connected
def activate_connection(