diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-02-07 22:59:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-07 22:59:32 +0200 |
commit | 0df49aa5ea0a052c2e33aa0f8e88564868b94946 (patch) | |
tree | 729dd884b6168d16ddd0bba2e98cfb7752834e94 /python/vyos/utils | |
parent | 23b4b7fbe863a83aaa950381ec7930016a741e76 (diff) | |
parent | f7a83728d4179ae5eedf0a109bc37733b79c82b4 (diff) | |
download | vyos-1x-0df49aa5ea0a052c2e33aa0f8e88564868b94946.tar.gz vyos-1x-0df49aa5ea0a052c2e33aa0f8e88564868b94946.zip |
Merge pull request #2962 from vyos/mergify/bp/sagitta/pr-2959
init: T2044: only start rpki if cache is configured (backport #2959)
Diffstat (limited to 'python/vyos/utils')
-rw-r--r-- | python/vyos/utils/config.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/vyos/utils/config.py b/python/vyos/utils/config.py index bd363ce46..33047010b 100644 --- a/python/vyos/utils/config.py +++ b/python/vyos/utils/config.py @@ -1,4 +1,4 @@ -# Copyright 2023 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2023-2024 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 @@ -31,4 +31,9 @@ def read_saved_value(path: list): if not ct.exists(path): return '' res = ct.return_values(path) - return res[0] if len(res) == 1 else res + if len(res) == 1: + return res[0] + res = ct.list_nodes(path) + if len(res) == 1: + return ' '.join(res) + return res |