summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-05 14:36:29 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-06 20:22:35 +0100
commitaceb0817a65bf01669cada3ceb60d65b81607bc3 (patch)
tree5418d4537cfc14115536315909fbb7a83277fe7a /src/helpers
parent356950579c2b155f9d41c04ed63c7efde561b43a (diff)
downloadvyos-1x-aceb0817a65bf01669cada3ceb60d65b81607bc3.tar.gz
vyos-1x-aceb0817a65bf01669cada3ceb60d65b81607bc3.zip
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.
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/validate-value.py4
1 files changed, 3 insertions, 1 deletions
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: