Properly connect to the selected VPN profile

The vpn module is trying to connect "self._connected_vpn_profile", but it is None when no VPN is connected. As a result, the VPN connecting menu is not working. Use "self._selected_vpn_profile" to connect the selected one.
This commit is contained in:
Naohiro Aota 2020-02-27 11:47:15 +09:00 committed by GitHub
parent 7414f9fa01
commit caf9696e2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ class Module(bumblebee.engine.Module):
try: try:
bumblebee.util.execute("nmcli c up \"{vpn}\"" bumblebee.util.execute("nmcli c up \"{vpn}\""
.format(vpn=self._connected_vpn_profile)) .format(vpn=self._selected_vpn_profile))
self._connected_vpn_profile = name self._connected_vpn_profile = name
except Exception as e: except Exception as e:
logging.exception("Couldn't establish VPN connection") logging.exception("Couldn't establish VPN connection")