From 68e5684d10079b287c54a27db7eec3547e22c7a6 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 15 Jan 2020 14:49:52 -0800 Subject: [PATCH] network: Fix activating connections that don't have real devices When a WireGuard connection is activated, it create the wireguard interface. Looking for matching devices before activating a connection will then fail. Use get_all_devices() API to get the list of all devices that are real and those that will be created due to connection activation. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/network.py b/plinth/network.py index b061f7540..67a846b8a 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -486,7 +486,7 @@ def activate_connection(connection_uuid): connection = get_connection(connection_uuid) interface = connection.get_interface_name() client = get_nm_client() - for device in client.get_devices(): + for device in client.get_all_devices(): if device.get_iface() == interface: client.activate_connection_async(connection, device, '/', None, _callback, None)