From 1a3683ad3f953bd9a12216c289224150d416386e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 5 Mar 2020 21:36:35 +0100 Subject: vrf: T31: use subprocess check_output over check_call --- src/conf_mode/vrf.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/conf_mode') 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}') -- cgit v1.2.3