summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/validate-value.py4
-rwxr-xr-xsrc/helpers/vyos-merge-config.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/helpers/validate-value.py b/src/helpers/validate-value.py
index fab6ca81e..a58ba61d1 100755
--- a/src/helpers/validate-value.py
+++ b/src/helpers/validate-value.py
@@ -5,7 +5,7 @@ import os
import sys
import argparse
-from vyos.util import run
+from vyos.util import call
parser = argparse.ArgumentParser()
parser.add_argument('--regex', action='append')
@@ -33,7 +33,7 @@ try:
cmd = "{0} {1}".format(cmd, args.value)
if debug:
print(cmd)
- res = run(cmd)
+ res = call(cmd)
if res == 0:
sys.exit(0)
except Exception as exn:
diff --git a/src/helpers/vyos-merge-config.py b/src/helpers/vyos-merge-config.py
index 6546c03e3..14df2734b 100755
--- a/src/helpers/vyos-merge-config.py
+++ b/src/helpers/vyos-merge-config.py
@@ -23,7 +23,7 @@ import vyos.remote
from vyos.config import Config
from vyos.configtree import ConfigTree
from vyos.migrator import Migrator, VirtualMigrator
-from vyos.util import cmd
+from vyos.util import cmd, DEVNULL
if (len(sys.argv) < 2):
@@ -99,9 +99,9 @@ if (len(sys.argv) > 2):
if path:
add_cmds = [ cmd for cmd in add_cmds if path in cmd ]
-for cmd in add_cmds:
+for add in add_cmds:
try:
- cmd(f'/opt/vyatta/sbin/my_{cmd}', message='Called process error')
+ cmd(f'/opt/vyatta/sbin/my_{add}', shell=True, stderr=DEVNULL)
except OSError as err:
print(err)