From d79cbf74142d4ab9fb00ff583c147a95a134ed92 Mon Sep 17 00:00:00 2001 From: Simon <965089+sarthurdev@users.noreply.github.com> Date: Sun, 30 May 2021 12:07:18 +0200 Subject: ipsec: T2816: Refactor to remove global variable and tidy up --- src/conf_mode/vpn_rsa-keys.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/conf_mode/vpn_rsa-keys.py') diff --git a/src/conf_mode/vpn_rsa-keys.py b/src/conf_mode/vpn_rsa-keys.py index a0e2e2690..6cf7eba6e 100755 --- a/src/conf_mode/vpn_rsa-keys.py +++ b/src/conf_mode/vpn_rsa-keys.py @@ -56,8 +56,9 @@ def verify(conf): def get_local_key(local_key): for path in LOCAL_KEY_PATHS: - if os.path.exists(path + local_key): - return path + local_key + full_path = os.path.join(path, local_key) + if os.path.exists(full_path): + return full_path return False def generate(conf): -- cgit v1.2.3