Python 3.4 compatibility patch
This commit is contained in:
parent
5f251b4593
commit
fca281d2c0
@ -315,7 +315,9 @@ def main():
|
|||||||
for library in libraries:
|
for library in libraries:
|
||||||
if library["type"] == "native":
|
if library["type"] == "native":
|
||||||
if "rules" in library and checkRules(library["rules"]) == "disallow": continue
|
if "rules" in library and checkRules(library["rules"]) == "disallow": continue
|
||||||
subprocess.run(["7z","x",library["filePathOS"],"-o" +nativesOutPath,"-aos"],check=True,stdout=subprocess.DEVNULL)
|
proc = subprocess.Popen(["7z","x",library["filePathOS"],"-o" +nativesOutPath,"-aos"],stdout=subprocess.DEVNULL)
|
||||||
|
rtn = proc.wait()
|
||||||
|
if rtn != 0: raise Exception("process","return code isn't 0")
|
||||||
|
|
||||||
launcherVariables = {}
|
launcherVariables = {}
|
||||||
launcherVariables["auth_player_name"] = lv["name"]
|
launcherVariables["auth_player_name"] = lv["name"]
|
||||||
@ -371,13 +373,14 @@ def main():
|
|||||||
|
|
||||||
print("\nLaunching Minecraft...")
|
print("\nLaunching Minecraft...")
|
||||||
if lv["console"] == "1":
|
if lv["console"] == "1":
|
||||||
subprocess.run([lv["java"]] + args,check = True)
|
proc = subprocess.Popen([lv["java"]] + args)
|
||||||
|
rtn = proc.wait()
|
||||||
|
if rtn != 0: raise Exception("process","return code isn't 0")
|
||||||
else:
|
else:
|
||||||
pkwargs = {
|
pkwargs = {
|
||||||
"stdout": subprocess.DEVNULL,
|
"stdout": subprocess.DEVNULL,
|
||||||
"stdin": subprocess.DEVNULL,
|
"stdin": subprocess.DEVNULL,
|
||||||
"stderr": subprocess.DEVNULL,
|
"stderr": subprocess.DEVNULL,
|
||||||
"close_fds": True
|
|
||||||
}
|
}
|
||||||
if lv["osName"] == "windows": pkwargs["creationflags"] = 0x00000008
|
if lv["osName"] == "windows": pkwargs["creationflags"] = 0x00000008
|
||||||
subprocess.Popen([lv["java"] + "w"] + args,**pkwargs)
|
subprocess.Popen([lv["java"] + "w"] + args,**pkwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user