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
1 changed files with 2 additions and 11 deletions
13
proton
13
proton
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue