proton: Remove python2 case

Python2 is dead, and we explicitly invoke python3 in the shebang anyway.
This commit is contained in:
Andrew Eikum 2020-01-06 08:21:54 -06:00
parent 9cf68a1c5e
commit 4338fb517a

13
proton
View file

@ -2,8 +2,6 @@
#script to launch Wine with the correct environment
from __future__ import print_function
import fcntl
import array
import filecmp
@ -725,13 +723,6 @@ if __name__ == "__main__":
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
if sys.argv[1] == "run":
#start target app
@ -744,11 +735,11 @@ if __name__ == "__main__":
elif sys.argv[1] == "getcompatpath":
#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)
binary_stdout.write(path)
sys.stdout.buffer.write(path)
elif sys.argv[1] == "getnativepath":
#windows -> linux path
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:
log("Need a verb.")
sys.exit(1)