summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/system/grub.py2
-rwxr-xr-xsrc/op_mode/image_manager.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/system/grub.py b/python/vyos/system/grub.py
index 0ac16af9a..4ebf229a0 100644
--- a/python/vyos/system/grub.py
+++ b/python/vyos/system/grub.py
@@ -138,6 +138,8 @@ def version_list(root_dir: str = '') -> list[str]:
versions_list: list[str] = []
for file in versions_files:
versions_list.append(file.stem)
+ versions_list.sort()
+
return versions_list
diff --git a/src/op_mode/image_manager.py b/src/op_mode/image_manager.py
index 76e414239..e75485f9f 100755
--- a/src/op_mode/image_manager.py
+++ b/src/op_mode/image_manager.py
@@ -157,8 +157,6 @@ def rename_image(name_old: str, name_new: str) -> None:
def list_images() -> None:
"""Print list of available images for CLI hints"""
images_list: list[str] = grub.version_list()
- images_list.sort()
-
for image_name in images_list:
print(image_name)