From 1ea4bd127228b5d6bd51b97ba24475dd33568636 Mon Sep 17 00:00:00 2001 From: z00484332 Date: Tue, 7 Jan 2020 15:50:45 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=90=88=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- desktop/core/src/desktop/supervisor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/core/src/desktop/supervisor.py b/desktop/core/src/desktop/supervisor.py index 5290b18..d715170 100644 --- a/desktop/core/src/desktop/supervisor.py +++ b/desktop/core/src/desktop/supervisor.py @@ -323,7 +323,10 @@ def main(): setup_user_info() pid_file = os.path.abspath(os.path.join(root, options.pid_file)) - pidfile_context = TimeOutPIDLockFile(pid_file, LOCKFILE_TIMEOUT) + if sys.version_info[0] > 2: + pidfile_context = TimeoutPIDLockFile(pid_file, LOCKFILE_TIMEOUT) + else: + pidfile_context = TimeOutPIDLockFile(pid_file, LOCKFILE_TIMEOUT) existing_pid = pidfile_context.read_pid() if existing_pid: -- 2.8.4.windows.1