diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-07-30 20:57:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-30 20:57:20 +0200 |
commit | 8cdfe151876781d03db3c2d0366f04875d7ab6d7 (patch) | |
tree | 0b04189e6991aa4e4c0ca422a89dc0a6c47404c8 /src | |
parent | ec713e585ace09beb9942d928e0099a35dcdd0f2 (diff) | |
parent | 3341c591ad1190f39ff3ffd475eddf5d95aef763 (diff) | |
download | vyos-1x-8cdfe151876781d03db3c2d0366f04875d7ab6d7.tar.gz vyos-1x-8cdfe151876781d03db3c2d0366f04875d7ab6d7.zip |
Merge pull request #947 from bstepler/T3694
configd: T3694: always set script.argv
Diffstat (limited to 'src')
-rwxr-xr-x | src/services/vyos-configd | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/services/vyos-configd b/src/services/vyos-configd index 6f770b696..670b6e66a 100755 --- a/src/services/vyos-configd +++ b/src/services/vyos-configd @@ -133,8 +133,7 @@ def explicit_print(path, mode, msg): logger.critical("error explicit_print") def run_script(script, config, args) -> int: - if args: - script.argv = args + script.argv = args config.set_level([]) try: c = script.get_config(config) @@ -208,7 +207,7 @@ def process_node_data(config, data) -> int: return R_ERROR_DAEMON script_name = None - args = None + args = [] res = re.match(r'^(VYOS_TAGNODE_VALUE=[^/]+)?.*\/([^/]+).py(.*)', data) if res.group(1): @@ -221,7 +220,7 @@ def process_node_data(config, data) -> int: return R_ERROR_DAEMON if res.group(3): args = res.group(3).split() - args.insert(0, f'{script_name}.py') + args.insert(0, f'{script_name}.py') if script_name not in include_set: return R_PASS |