From 96d811fe79b907fa6d8aef2378fc651c4d815179 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Thu, 8 Jun 2023 18:34:49 +0530 Subject: [PATCH] [fix] Use non-mutable default arguments Fixed signature of netjsonconfig.backends.openvpn.converters.OpenVpn.__intermediate_vpn to use non-mutable default argument. Co-authored-by: Aryaman --- netjsonconfig/backends/openvpn/converters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netjsonconfig/backends/openvpn/converters.py b/netjsonconfig/backends/openvpn/converters.py index 922b7f83f..5853e826b 100644 --- a/netjsonconfig/backends/openvpn/converters.py +++ b/netjsonconfig/backends/openvpn/converters.py @@ -24,7 +24,8 @@ def to_intermediate_loop(self, block, result, index=None): result['openvpn'].append(vpn) return result - def __intermediate_vpn(self, config, remove=[False, 0, '']): + def __intermediate_vpn(self, config, remove=None): + remove = remove or [False, 0, ''] skip_keys = ['script_security', 'remote'] delete_keys = [] # allow server_bridge to be empty and still rendered