diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-30 17:25:27 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-05-30 15:28:48 +0000 |
commit | 8f7da732497ba5b249be092ae6019b3750410375 (patch) | |
tree | 8e192ad6468fa139fccb10e64314e0cfc4fc198c | |
parent | a2a3a3e239534d5665f5992c3aacd15545904c87 (diff) | |
download | vyos-1x-8f7da732497ba5b249be092ae6019b3750410375.tar.gz vyos-1x-8f7da732497ba5b249be092ae6019b3750410375.zip |
reverse-proxy: T6409: unindent migration script code path
(cherry picked from commit dd2516904527c74e01e0ced5166afe72a479ee00)
-rwxr-xr-x | src/migration-scripts/reverse-proxy/0-to-1 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/migration-scripts/reverse-proxy/0-to-1 b/src/migration-scripts/reverse-proxy/0-to-1 index 62be52ea6..d61493815 100755 --- a/src/migration-scripts/reverse-proxy/0-to-1 +++ b/src/migration-scripts/reverse-proxy/0-to-1 @@ -33,16 +33,16 @@ base = ['load-balancing', 'reverse-proxy', 'backend'] if not config.exists(base): # Nothing to do exit(0) -else: - # we need to run this for every configured network - for backend in config.list_nodes(base): - param_node = base + [backend, 'parameters'] - if config.exists(param_node): - config.delete(param_node) - - try: - with open(file_name, 'w') as f: - f.write(config.to_string()) - except OSError as e: - print("Failed to save the modified config: {}".format(e)) - exit(1) + +# we need to run this for every configured network +for backend in config.list_nodes(base): + param_node = base + [backend, 'parameters'] + if config.exists(param_node): + config.delete(param_node) + +try: + with open(file_name, 'w') as f: + f.write(config.to_string()) +except OSError as e: + print("Failed to save the modified config: {}".format(e)) + exit(1) |