Sort listdir output which is arbitrary (un)sorted before
This commit is contained in:
parent
9cd968b4bd
commit
8d27e18464
6
run.py
6
run.py
@ -43,7 +43,7 @@ def blockdevice(termsize, settings):
|
|||||||
|
|
||||||
|
|
||||||
def checks(termsize, settings):
|
def checks(termsize, settings):
|
||||||
for check in os.listdir("checks/"):
|
for check in os.listdir("checks/").sort:
|
||||||
if check[-6:] == ".check":
|
if check[-6:] == ".check":
|
||||||
# Run loop
|
# Run loop
|
||||||
run = True
|
run = True
|
||||||
@ -71,7 +71,7 @@ def checks(termsize, settings):
|
|||||||
|
|
||||||
|
|
||||||
def steps(termsize, settings):
|
def steps(termsize, settings):
|
||||||
for step in os.listdir("steps/"):
|
for step in os.listdir("steps/").sort:
|
||||||
if step[-5:] == ".step":
|
if step[-5:] == ".step":
|
||||||
# Run loop
|
# Run loop
|
||||||
run = True
|
run = True
|
||||||
@ -99,7 +99,7 @@ def steps(termsize, settings):
|
|||||||
|
|
||||||
|
|
||||||
def flavours(termsize, settings):
|
def flavours(termsize, settings):
|
||||||
for flavour in os.listdir("flavours/"):
|
for flavour in os.listdir("flavours/").sort:
|
||||||
if flavour[-8:] == ".flavour":
|
if flavour[-8:] == ".flavour":
|
||||||
# Run loop
|
# Run loop
|
||||||
if _ask("Do you want to run flavour %s?" % (flavour), [ "yes", "no" ]) == "no":
|
if _ask("Do you want to run flavour %s?" % (flavour), [ "yes", "no" ]) == "no":
|
||||||
|
Loading…
Reference in New Issue
Block a user