summaryrefslogtreecommitdiff
path: root/src/conf_mode/http-api.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-05 17:08:35 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-06 20:22:35 +0100
commit9e920477511d6d6286767597e17d09bd66aae70b (patch)
treef64e3962f523f0c77c28ed8951764a191b394442 /src/conf_mode/http-api.py
parent7c56a3655f972898768b0cea5e579f451fe6e848 (diff)
downloadvyos-1x-9e920477511d6d6286767597e17d09bd66aae70b.tar.gz
vyos-1x-9e920477511d6d6286767597e17d09bd66aae70b.zip
util: T2226: rewrite http to use cmd
Diffstat (limited to 'src/conf_mode/http-api.py')
-rwxr-xr-xsrc/conf_mode/http-api.py6
1 files changed, 1 insertions, 5 deletions
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: