summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-30 17:25:27 +0200
committerChristian Breunig <christian@breunig.cc>2024-05-30 17:25:27 +0200
commitdd2516904527c74e01e0ced5166afe72a479ee00 (patch)
tree142ea02993aa5344a6ffa0cac0e844f8113a1296 /src
parentfb6602f431f5595b97ea3726467ec782fa50ceb8 (diff)
downloadvyos-1x-dd2516904527c74e01e0ced5166afe72a479ee00.tar.gz
vyos-1x-dd2516904527c74e01e0ced5166afe72a479ee00.zip
reverse-proxy: T6409: unindent migration script code path
Diffstat (limited to 'src')
-rwxr-xr-xsrc/migration-scripts/reverse-proxy/0-to-126
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)