summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-03-27 12:03:58 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-03-27 12:03:58 -0500
commitf8522f323ec26a2a1507a6026cbc939bb8960262 (patch)
tree3fb40e3949eb973b48082a6516f6e4aba0c174ff
parent2727f57c0643656b8de2a65ce04137f31f790c53 (diff)
downloadvyos-1x-f8522f323ec26a2a1507a6026cbc939bb8960262.tar.gz
vyos-1x-f8522f323ec26a2a1507a6026cbc939bb8960262.zip
openvpn: T5051: fix hyphen/underscore error in use of typing.Literal
-rwxr-xr-xsrc/op_mode/openvpn.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/openvpn.py b/src/op_mode/openvpn.py
index 7ae49472e..37fdbcbeb 100755
--- a/src/op_mode/openvpn.py
+++ b/src/op_mode/openvpn.py
@@ -150,7 +150,8 @@ def _get_raw_data(mode: str) -> list:
if not conf_dict:
return data
- interfaces = [x for x in list(conf_dict) if conf_dict[x]['mode'] == mode]
+ interfaces = [x for x in list(conf_dict) if
+ conf_dict[x]['mode'].replace('-', '_') == mode]
for intf in interfaces:
d = _get_interface_status(mode, intf)
d['local_host'] = conf_dict[intf].get('local-host', '')