MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / GetDistroInfo

Function GetDistroInfo

Scripts/CI_FetchRootFS.py:9–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import subprocess
8
9def GetDistroInfo():
10 DistroName = "Unknown"
11 DistroVersion = "Unknown"
12
13 with open("/etc/lsb-release", 'r') as f:
14 while True:
15 Line = f.readline()
16 if not Line:
17 break
18 Split = Line.split("=")
19 if Split[0] == "DISTRIB_ID":
20 DistroName = Split[1].lower().rstrip()
21 if Split[0] == "DISTRIB_RELEASE":
22 DistroVersion = Split[1].rstrip()
23
24 return [DistroName, DistroVersion]
25
26def FindBestImageFit(Distro, links_file):
27 CurrentFitSize = 0

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected