Skip to content

Commit

Permalink
reverse-proxy: T6409: unindent migration script code path
Browse files Browse the repository at this point in the history
  • Loading branch information
c-po committed May 30, 2024
1 parent fb6602f commit dd25169
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/migration-scripts/reverse-proxy/0-to-1
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit dd25169

Please sign in to comment.