From 02999a44d6eb0497b0bbea62ece0965e68846d6d Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Wed, 6 Dec 2023 10:22:52 +0100 Subject: [PATCH] feat: more sorting of directory lists --- transform-deployments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transform-deployments.py b/transform-deployments.py index 959f366c..f544979c 100644 --- a/transform-deployments.py +++ b/transform-deployments.py @@ -17,12 +17,12 @@ def main(): # Get deployments active_deployments = [] old_deployments = [] - ls = os.listdir(f"{basepath}/tasks") + ls = sorted(os.listdir(f"{basepath}/tasks")) for path in ls: if bool(re.search(r"^\d{8}", path)): active_deployments.append(path) - ls = os.listdir(f"{basepath}/tasks/deprecated") + ls = sorted(os.listdir(f"{basepath}/tasks/deprecated")) for path in ls: if bool(re.search(r"^\d{8}", path)): old_deployments.append(path)