From 9e920477511d6d6286767597e17d09bd66aae70b Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sun, 5 Apr 2020 17:08:35 +0100 Subject: util: T2226: rewrite http to use cmd --- src/conf_mode/http-api.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/conf_mode/http-api.py') diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py index ffa68af55..91b8aa34b 100755 --- a/src/conf_mode/http-api.py +++ b/src/conf_mode/http-api.py @@ -96,11 +96,7 @@ def apply(http_api): run('sudo systemctl stop vyos-http-api.service') for dep in dependencies: - cmd = '{0}/{1}'.format(vyos_conf_scripts_dir, dep) - try: - subprocess.check_call(cmd, shell=True) - except subprocess.CalledProcessError as err: - raise ConfigError("{}.".format(err)) + cmd(f'{vyos_conf_scripts_dir}/{dep}', raising=ConfigError) if __name__ == '__main__': try: -- cgit v1.2.3