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

Function GetPPAStatus

Scripts/InstallFEX.py:137–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135FEXPPA_REGEX = r".*\/fex-emu\/fex\/ubuntu$"
136
137def GetPPAStatus():
138 global _PPAInstalled
139
140 if _PPAInstalled == None:
141 _PPAInstalled = False
142
143 CacheResults = subprocess.check_output(['apt-cache', 'policy']).decode("utf-8")
144
145 for Line in CacheResults.split("\n"):
146 if "http" in Line:
147 Line = Line.strip()
148 LineSplit = Line.split(" ")
149
150 # 'status' 'URL' 'series' 'arch' 'type'
151 if re.match(FEXPPA_REGEX, LineSplit[1]):
152 _PPAInstalled = True
153 break
154
155 return _PPAInstalled
156
157def InstallPPA():
158 print ("Installing PPA: ppa:fex-emu/fex")

Callers 1

mainFunction · 0.85

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected