Use format vpn namespace

This commit is contained in:
Stijn Van Campenhout 2019-11-12 11:10:59 +01:00
parent c669f49d9f
commit 00bc827f27

View file

@ -66,7 +66,7 @@ class Module(bumblebee.engine.Module):
def _on_vpn_disconnect(self): def _on_vpn_disconnect(self):
try: try:
bumblebee.util.execute("nmcli c down \"{vpn}\"" bumblebee.util.execute("nmcli c down \"{vpn}\""
.format(self._connected_vpn_profile)) .format(vpn=self._connected_vpn_profile))
self._connected_vpn_profile = None self._connected_vpn_profile = None
except Exception as e: except Exception as e:
logging.exception("Couldn't disconnect VPN connection") logging.exception("Couldn't disconnect VPN connection")
@ -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(self._connected_vpn_profile)) .format(vpn=self._connected_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")