diff --git a/python/vyos/ifconfig/wireguard.py b/python/vyos/ifconfig/wireguard.py index 6b32584017..c1bb75d992 100644 --- a/python/vyos/ifconfig/wireguard.py +++ b/python/vyos/ifconfig/wireguard.py @@ -170,12 +170,15 @@ def reset_peer(self, interface, peer_name=None): if not address or not port: if peer_name is not None: - print(f"Peer {peer_name} endpoint not set") + print(f'Peer {peer_name} endpoint not set') continue cmd = f"wg set {self.config['ifname']} peer {public_key} endpoint {address}:{port}" try: - print(f"Resetting {self.config['ifname']} peer {public_key} endpoint to {address}:{port} ... ", end='') + print( + f'Resetting {self.config['ifname']} peer {public_key} endpoint to {address}:{port} ... ', + end='' + ) self._cmd(cmd, env={'WG_ENDPOINT_RESOLUTION_RETRIES': '5'}) print('done') except: @@ -272,7 +275,10 @@ def update(self, config): else: cmd += ' endpoint {address}:{port}' - self._cmd(cmd.format(**peer_config), env={'WG_ENDPOINT_RESOLUTION_RETRIES': '5'}) + self._cmd( + cmd.format(**peer_config), + env={'WG_ENDPOINT_RESOLUTION_RETRIES': '5'}, + ) except: # todo: logging pass