소스 검색

HUE-9111 [core] Fix typo in pidfile_context import

z00484332 5 년 전
부모
커밋
01217c389c
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      desktop/core/src/desktop/supervisor.py

+ 4 - 1
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: