diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-03-29 18:28:21 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-03-29 18:28:21 +0200 |
commit | 113338f794dd4955566a1fa39833fe1c01311f7b (patch) | |
tree | 2b9cf785012cf64d328c0e5cdbbd3e10f365a638 | |
parent | 6458f91735412fb2e6e7e37f7b3e6ca587a5a235 (diff) | |
download | vyos-1x-113338f794dd4955566a1fa39833fe1c01311f7b.tar.gz vyos-1x-113338f794dd4955566a1fa39833fe1c01311f7b.zip |
isis: T3417: fix invalid call to exit() in migration script
-rwxr-xr-x | src/migration-scripts/isis/0-to-1 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/migration-scripts/isis/0-to-1 b/src/migration-scripts/isis/0-to-1 index 6773f4009..93cbbbed5 100755 --- a/src/migration-scripts/isis/0-to-1 +++ b/src/migration-scripts/isis/0-to-1 @@ -47,12 +47,13 @@ config.copy(isis_base, tmp_base) # Now it's save to delete the old configuration config.delete(base) -# Rename temporary copy to new final config and set domain key +# Rename temporary copy to new final config (IS-IS domain key is static and no +# longer required to be set via CLI) config.rename(tmp_base, 'isis') 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)) - sys.exit(1) + print(f'Failed to save the modified config: {e}') + exit(1) |