diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-18 17:35:31 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-18 17:35:31 +0100 |
commit | dd194aaa4a2ff04865c54c61282098d56d572ed9 (patch) | |
tree | 904cffc51618dbb7cb30b0d6293d29005ce1e00f /src | |
parent | d76dbb558a4fcb73c2377b5524451bb408419802 (diff) | |
download | vyos-1x-dd194aaa4a2ff04865c54c61282098d56d572ed9.tar.gz vyos-1x-dd194aaa4a2ff04865c54c61282098d56d572ed9.zip |
interfaces: T2320: correctly honour create and debug options
Diffstat (limited to 'src')
-rwxr-xr-x | src/op_mode/wireguard.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/op_mode/wireguard.py b/src/op_mode/wireguard.py index 297ba599d..15bf63e81 100755 --- a/src/op_mode/wireguard.py +++ b/src/op_mode/wireguard.py @@ -147,8 +147,12 @@ if __name__ == '__main__': if args.listkdir: list_key_dirs() if args.showinterface: - intf = WireGuardIf(args.showinterface, create=False, debug=False) - print(intf.operational.show_interface()) + try: + intf = WireGuardIf(args.showinterface, create=False, debug=False) + print(intf.operational.show_interface()) + # the interface does not exists + except Exception: + pass if args.delkdir: if args.location: del_key_dir(args.location) |