From 4338fb517aedcfe1f8217377e598172d04eb9788 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 6 Jan 2020 08:21:54 -0600 Subject: [PATCH] proton: Remove python2 case Python2 is dead, and we explicitly invoke python3 in the shebang anyway. --- proton | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/proton b/proton index 0f5e3d62..9921eff2 100755 --- a/proton +++ b/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)