mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-02-03 17:20:51 +03:00
proton: Remove python2 case
Python2 is dead, and we explicitly invoke python3 in the shebang anyway.
This commit is contained in:
parent
9cf68a1c5e
commit
4338fb517a
13
proton
13
proton
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#script to launch Wine with the correct environment
|
#script to launch Wine with the correct environment
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import fcntl
|
import fcntl
|
||||||
import array
|
import array
|
||||||
import filecmp
|
import filecmp
|
||||||
@ -725,13 +723,6 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
g_session.init_session()
|
g_session.init_session()
|
||||||
|
|
||||||
if sys.version_info[0] == 2:
|
|
||||||
binary_stdout = sys.stdout
|
|
||||||
elif sys.version_info[0] == 3:
|
|
||||||
binary_stdout = sys.stdout.buffer
|
|
||||||
else:
|
|
||||||
raise Exception("Unsupported python version")
|
|
||||||
|
|
||||||
#determine mode
|
#determine mode
|
||||||
if sys.argv[1] == "run":
|
if sys.argv[1] == "run":
|
||||||
#start target app
|
#start target app
|
||||||
@ -744,11 +735,11 @@ if __name__ == "__main__":
|
|||||||
elif sys.argv[1] == "getcompatpath":
|
elif sys.argv[1] == "getcompatpath":
|
||||||
#linux -> windows path
|
#linux -> windows path
|
||||||
path = subprocess.check_output([g_proton.wine_bin, "winepath", "-w", sys.argv[2]], env=g_session.env, stderr=g_session.log_file)
|
path = subprocess.check_output([g_proton.wine_bin, "winepath", "-w", sys.argv[2]], env=g_session.env, stderr=g_session.log_file)
|
||||||
binary_stdout.write(path)
|
sys.stdout.buffer.write(path)
|
||||||
elif sys.argv[1] == "getnativepath":
|
elif sys.argv[1] == "getnativepath":
|
||||||
#windows -> linux path
|
#windows -> linux path
|
||||||
path = subprocess.check_output([g_proton.wine_bin, "winepath", sys.argv[2]], env=g_session.env, stderr=g_session.log_file)
|
path = subprocess.check_output([g_proton.wine_bin, "winepath", sys.argv[2]], env=g_session.env, stderr=g_session.log_file)
|
||||||
binary_stdout.write(path)
|
sys.stdout.buffer.write(path)
|
||||||
else:
|
else:
|
||||||
log("Need a verb.")
|
log("Need a verb.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user