diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-08-14 13:25:10 -0400 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-08-14 13:25:10 -0400 |
commit | 589952faadcf7700702b24390c1d654706f3a857 (patch) | |
tree | b3d486d0b0bc9e08d706d16d852bcae60b504dc0 /src/conf_mode/http-api.py | |
parent | 4e781d4dec184308ac844a4c2ff7dcfc7832cc77 (diff) | |
parent | 8d1e768a6f3285ed717f588f356db9340871b043 (diff) | |
download | vyos-1x-589952faadcf7700702b24390c1d654706f3a857.tar.gz vyos-1x-589952faadcf7700702b24390c1d654706f3a857.zip |
Merge branch 'current' into equuleus
Diffstat (limited to 'src/conf_mode/http-api.py')
-rwxr-xr-x | src/conf_mode/http-api.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py index 7d618dded..c1d596ea3 100755 --- a/src/conf_mode/http-api.py +++ b/src/conf_mode/http-api.py @@ -84,15 +84,16 @@ def generate(http_api): def apply(http_api): if http_api is not None: os.system('sudo systemctl restart 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)) else: os.system('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)) + if __name__ == '__main__': try: c = get_config() |