summaryrefslogtreecommitdiff
path: root/src/migration-scripts/interfaces/5-to-6
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-24 08:33:23 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-24 08:33:23 +0200
commitacc701bac3483a3242c77a2e00c076890e27eea9 (patch)
tree25b4cadd7d9dbcc04efb75f160aa5f533ab9753e /src/migration-scripts/interfaces/5-to-6
parent8f304d2e214c9123b106b2feab8d310912c6b000 (diff)
downloadvyos-1x-acc701bac3483a3242c77a2e00c076890e27eea9.tar.gz
vyos-1x-acc701bac3483a3242c77a2e00c076890e27eea9.zip
router-advert: T3561: fix inconsistent use of tabs and spaces in indentation
Commit c17f259d ("router-advert: T3561: add support for specific routes") used tabs over spaces in the Migration script which triggered a TabError (inconsistent use of tabs and spaces in indentation").
Diffstat (limited to 'src/migration-scripts/interfaces/5-to-6')
-rwxr-xr-xsrc/migration-scripts/interfaces/5-to-622
1 files changed, 11 insertions, 11 deletions
diff --git a/src/migration-scripts/interfaces/5-to-6 b/src/migration-scripts/interfaces/5-to-6
index 8ae34c208..ae79c1d1b 100755
--- a/src/migration-scripts/interfaces/5-to-6
+++ b/src/migration-scripts/interfaces/5-to-6
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2020 VyOS maintainers and contributors
+# Copyright (C) 2020-2021 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -55,16 +55,16 @@ def copy_rtradv(c, old_base, interface):
min_max = interval.split('-')[0]
c.set(new_base + ['interval', min_max], value=tmp)
- # cleanup boolean nodes in individual route
- route_base = new_base + ['route']
- if c.exists(route_base):
- for route in config.list_nodes(route_base):
- if c.exists(route_base + [route, 'remove-route']):
- tmp = c.return_value(route_base + [route, 'remove-route'])
- c.delete(route_base + [route, 'remove-route'])
- if tmp == 'false':
- c.set(route_base + [route, 'no-remove-route'])
-
+ # cleanup boolean nodes in individual route
+ route_base = new_base + ['route']
+ if c.exists(route_base):
+ for route in config.list_nodes(route_base):
+ if c.exists(route_base + [route, 'remove-route']):
+ tmp = c.return_value(route_base + [route, 'remove-route'])
+ c.delete(route_base + [route, 'remove-route'])
+ if tmp == 'false':
+ c.set(route_base + [route, 'no-remove-route'])
+
# cleanup boolean nodes in individual prefix
prefix_base = new_base + ['prefix']
if c.exists(prefix_base):