summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_openconnect.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2023-02-22 10:01:19 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2023-02-22 10:01:19 +0100
commit806273bff6a60335a30cb203ca9e4319a31e6020 (patch)
tree3556052d239767e94093f20e44b8decc7d59f924 /src/conf_mode/vpn_openconnect.py
parent8dc1eece67124678abe21aef9c6392bc2cd78612 (diff)
downloadvyos-1x-806273bff6a60335a30cb203ca9e4319a31e6020.tar.gz
vyos-1x-806273bff6a60335a30cb203ca9e4319a31e6020.zip
openconnect: T5023: Conf script missing optional config parameter
Diffstat (limited to 'src/conf_mode/vpn_openconnect.py')
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 855eb99f9..bf5d3ac84 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -105,8 +105,11 @@ def T2665_default_dict_cleanup(origin: dict, default_values: dict) -> dict:
return origin
-def get_config():
- conf = Config()
+def get_config(config=None):
+ if config:
+ conf = config
+ else:
+ conf = Config()
base = ['vpn', 'openconnect']
if not conf.exists(base):
return None