From 9627888b89ddb712eec06a19bcc149367e8c3036 Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Wed, 19 Aug 2020 10:16:00 +0000 Subject: anyconnect: T2811: Return None if anyconnect not configured --- src/conf_mode/vpn_anyconnect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf_mode/vpn_anyconnect.py b/src/conf_mode/vpn_anyconnect.py index 45c06bffa..158e1a117 100755 --- a/src/conf_mode/vpn_anyconnect.py +++ b/src/conf_mode/vpn_anyconnect.py @@ -43,6 +43,9 @@ def get_hash(password): def get_config(): conf = Config() base = ['vpn', 'anyconnect'] + if not conf.exists(base): + return None + ocserv = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) default_values = defaults(base) ocserv = dict_merge(default_values, ocserv) -- cgit v1.2.3