summaryrefslogtreecommitdiff
path: root/src/op_mode/wireguard.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-18 20:27:20 +0200
committerGitHub <noreply@github.com>2020-04-18 20:27:20 +0200
commit8ca76a93743e18f94428fd00e3d8c277eaaceec9 (patch)
tree904cffc51618dbb7cb30b0d6293d29005ce1e00f /src/op_mode/wireguard.py
parentd76dbb558a4fcb73c2377b5524451bb408419802 (diff)
parentdd194aaa4a2ff04865c54c61282098d56d572ed9 (diff)
downloadvyos-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/op_mode/wireguard.py')
-rwxr-xr-xsrc/op_mode/wireguard.py8
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)