summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-05 21:36:35 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-05 21:36:35 +0100
commit1a3683ad3f953bd9a12216c289224150d416386e (patch)
treee48a60168112ac80d793f3bbb5a24c1189f7241a /src/conf_mode
parentab648ec98610d41a759d380000e4dce7c181cf3b (diff)
downloadvyos-1x-1a3683ad3f953bd9a12216c289224150d416386e.tar.gz
vyos-1x-1a3683ad3f953bd9a12216c289224150d416386e.zip
vrf: T31: use subprocess check_output over check_call
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/vrf.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index bdd57177c..f87622b89 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -19,7 +19,7 @@ import jinja2
from sys import exit
from copy import deepcopy
-from subprocess import check_call, CalledProcessError
+from subprocess import check_output, CalledProcessError
from vyos.config import Config
from vyos.configdict import list_diff
@@ -50,11 +50,8 @@ default_config_data = {
}
def _cmd(command):
- """
- Run any arbitrary command on the system
- """
try:
- check_call(command.split())
+ check_output(command.split())
except CalledProcessError as e:
raise ConfigError(f'Error changing VRF: {e}')