mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
Sort file lists before processing in getmodels, getaddons, and getmodules functions
This commit is contained in:
parent
533ed76851
commit
e33511bb06
@ -25,6 +25,7 @@ def cli():
|
|||||||
def getmodels(workpath, jsonpath, xlsxpath):
|
def getmodels(workpath, jsonpath, xlsxpath):
|
||||||
# Read the model-configs files
|
# Read the model-configs files
|
||||||
MS = glob.glob("{}/opt/rr/model-configs/*.yml".format(workpath))
|
MS = glob.glob("{}/opt/rr/model-configs/*.yml".format(workpath))
|
||||||
|
MS.sort()
|
||||||
models = {}
|
models = {}
|
||||||
for M in MS:
|
for M in MS:
|
||||||
with open(M, "r") as f:
|
with open(M, "r") as f:
|
||||||
@ -60,6 +61,7 @@ def getmodels(workpath, jsonpath, xlsxpath):
|
|||||||
def getaddons(workpath, jsonpath, xlsxpath):
|
def getaddons(workpath, jsonpath, xlsxpath):
|
||||||
# Read the manifest.yml file
|
# Read the manifest.yml file
|
||||||
AS = glob.glob("{}/mnt/p3/addons/*/manifest.yml".format(workpath))
|
AS = glob.glob("{}/mnt/p3/addons/*/manifest.yml".format(workpath))
|
||||||
|
AS.sort()
|
||||||
addons = {}
|
addons = {}
|
||||||
for A in AS:
|
for A in AS:
|
||||||
with open(A, "r") as file:
|
with open(A, "r") as file:
|
||||||
@ -87,6 +89,7 @@ def getaddons(workpath, jsonpath, xlsxpath):
|
|||||||
def getmodules(workpath, jsonpath, xlsxpath):
|
def getmodules(workpath, jsonpath, xlsxpath):
|
||||||
# Read the module files
|
# Read the module files
|
||||||
MS = glob.glob("{}/mnt/p3/modules/*.tgz".format(workpath))
|
MS = glob.glob("{}/mnt/p3/modules/*.tgz".format(workpath))
|
||||||
|
MS.sort()
|
||||||
modules = {}
|
modules = {}
|
||||||
TMP_PATH = "/tmp/modules"
|
TMP_PATH = "/tmp/modules"
|
||||||
if os.path.exists(TMP_PATH):
|
if os.path.exists(TMP_PATH):
|
||||||
@ -100,6 +103,7 @@ def getmodules(workpath, jsonpath, xlsxpath):
|
|||||||
tar.extractall(TMP_PATH)
|
tar.extractall(TMP_PATH)
|
||||||
# Traverse the extracted files
|
# Traverse the extracted files
|
||||||
KS = glob.glob("{}/*.ko".format(TMP_PATH))
|
KS = glob.glob("{}/*.ko".format(TMP_PATH))
|
||||||
|
KS.sort()
|
||||||
for K in KS:
|
for K in KS:
|
||||||
K_name = os.path.splitext(os.path.basename(K))[0]
|
K_name = os.path.splitext(os.path.basename(K))[0]
|
||||||
K_info = kmodule.modinfo(K)[0]
|
K_info = kmodule.modinfo(K)[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user