From aceb0817a65bf01669cada3ceb60d65b81607bc3 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sun, 5 Apr 2020 14:36:29 +0100 Subject: util: T2226: covert most calls from os.system to util As little change a possible but the function call The behaviour should be totally unchanged. --- src/helpers/validate-value.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/helpers/validate-value.py') diff --git a/src/helpers/validate-value.py b/src/helpers/validate-value.py index 36f996d38..fab6ca81e 100755 --- a/src/helpers/validate-value.py +++ b/src/helpers/validate-value.py @@ -5,6 +5,8 @@ import os import sys import argparse +from vyos.util import run + parser = argparse.ArgumentParser() parser.add_argument('--regex', action='append') parser.add_argument('--exec', action='append') @@ -31,7 +33,7 @@ try: cmd = "{0} {1}".format(cmd, args.value) if debug: print(cmd) - res = os.system(cmd) + res = run(cmd) if res == 0: sys.exit(0) except Exception as exn: -- cgit v1.2.3