Move get dependant runtimes to common to be reused

This commit is contained in:
Heliguy
2023-10-22 21:21:33 -04:00
parent 715394104c
commit 167a206544

View File

@@ -125,6 +125,15 @@ class myUtils:
sorted_array = sorted(data, key=lambda item: item[0].lower())
return sorted_array
def getDependantRuntimes(self):
paks = self.getHostFlatpaks()
dependant_runtimes = []
for i in range(len(paks)):
current = paks[i]
if current[13] not in dependant_runtimes and current[13] != "":
dependant_runtimes.append(current[13])
return(dependant_runtimes)
def getHostMasks(self, user_or_system):
output = subprocess.run(["flatpak-spawn", "--host", "flatpak", "mask", f"--{user_or_system}"], capture_output=True, text=True, env=self.new_env).stdout
lines = output.strip().split("\n")