From f855dda70f28f36dc3a0830628bfa7d66b28f15e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 18 Aug 2021 15:40:58 -0400 Subject: [PATCH] Sort list of distributions and profiles The default sort order of listdir isn't particularly helpful to anyone. --- confluent_server/confluent/osimage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 9dcb80a7..78ebcdb5 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -607,10 +607,10 @@ def printit(info): def list_distros(): - return os.listdir('/var/lib/confluent/distributions') + return sorted(os.listdir('/var/lib/confluent/distributions')) def list_profiles(): - return os.listdir('/var/lib/confluent/public/os/') + return sorted(os.listdir('/var/lib/confluent/public/os/')) def get_profile_label(profile): with open('/var/lib/confluent/public/os/{0}/profile.yaml') as metadata: