chg: [tool] sort before output

pull/176/head
mokaddem 2019-11-05 15:03:02 +01:00
parent 4e21962961
commit 05778f0157
2 changed files with 8 additions and 4 deletions

View File

@ -10,7 +10,9 @@ TAXONOMY_ROOT_PATH = Path(__file__).resolve().parent.parent
def fetchTaxonomies():
taxonomiesFolder = TAXONOMY_ROOT_PATH
taxonomies = []
for taxonomyFile in taxonomiesFolder.glob('./*/machinetag.json'):
allTaxonomies = list(taxonomiesFolder.glob('./*/machinetag.json'))
allTaxonomies.sort()
for taxonomyFile in allTaxonomies:
with open(taxonomyFile) as f:
taxonomy = json.load(f)
taxonomies.append(taxonomy)

View File

@ -10,7 +10,9 @@ TAXONOMY_ROOT_PATH = Path(__file__).resolve().parent.parent
def fetchTaxonomies():
taxonomiesFolder = TAXONOMY_ROOT_PATH
taxonomies = []
for taxonomyFile in taxonomiesFolder.glob('./*/machinetag.json'):
allTaxonomies = list(taxonomiesFolder.glob('./*/machinetag.json'))
allTaxonomies.sort()
for taxonomyFile in allTaxonomies:
with open(taxonomyFile) as f:
taxonomy = json.load(f)
taxonomies.append(taxonomy)