diff options
Diffstat (limited to 'src/migration-scripts/vrf/2-to-3')
| -rw-r--r-- | src/migration-scripts/vrf/2-to-3 | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/migration-scripts/vrf/2-to-3 b/src/migration-scripts/vrf/2-to-3 index acacffb41..b43067031 100644 --- a/src/migration-scripts/vrf/2-to-3 +++ b/src/migration-scripts/vrf/2-to-3 @@ -1,4 +1,4 @@ -# Copyright 2021-2024 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright VyOS maintainers and contributors <maintainers@vyos.io>  #  # This library is free software; you can redistribute it and/or  # modify it under the terms of the GNU Lesser General Public @@ -76,7 +76,8 @@ def migrate(config: ConfigTree) -> None:      # Get a list of all currently used VRFs and tables      vrfs_current = {}      for vrf in config.list_nodes(base): -        vrfs_current[vrf] = int(config.return_value(base + [vrf, 'table'])) +        if config.exists(base + [vrf, 'table']): +            vrfs_current[vrf] = int(config.return_value(base + [vrf, 'table']))      # Check VRF names and table numbers      name_regex = re.compile(r'^\d.*$') | 
