diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-18 20:27:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 20:27:20 +0200 |
commit | 8ca76a93743e18f94428fd00e3d8c277eaaceec9 (patch) | |
tree | 904cffc51618dbb7cb30b0d6293d29005ce1e00f /src | |
parent | d76dbb558a4fcb73c2377b5524451bb408419802 (diff) | |
parent | dd194aaa4a2ff04865c54c61282098d56d572ed9 (diff) | |
download | vyos-1x-8ca76a93743e18f94428fd00e3d8c277eaaceec9.tar.gz vyos-1x-8ca76a93743e18f94428fd00e3d8c277eaaceec9.zip |
Merge pull request #357 from thomas-mangin/T2320
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) |