Sort listdir output which is arbitrary (un)sorted before

This commit is contained in:
maride 2018-02-02 17:02:40 +01:00
parent 9cd968b4bd
commit 8d27e18464

6
run.py
View File

@ -43,7 +43,7 @@ def blockdevice(termsize, settings):
def checks(termsize, settings):
for check in os.listdir("checks/"):
for check in os.listdir("checks/").sort:
if check[-6:] == ".check":
# Run loop
run = True
@ -71,7 +71,7 @@ def checks(termsize, settings):
def steps(termsize, settings):
for step in os.listdir("steps/"):
for step in os.listdir("steps/").sort:
if step[-5:] == ".step":
# Run loop
run = True
@ -99,7 +99,7 @@ def steps(termsize, settings):
def flavours(termsize, settings):
for flavour in os.listdir("flavours/"):
for flavour in os.listdir("flavours/").sort:
if flavour[-8:] == ".flavour":
# Run loop
if _ask("Do you want to run flavour %s?" % (flavour), [ "yes", "no" ]) == "no":