From f7fd09d1b303d83f463a902ad7b0006c2d21bf85 Mon Sep 17 00:00:00 2001 From: Istvan Toth Date: Mon, 8 Aug 2022 07:31:43 +0200 Subject: [PATCH] PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+ backport https://pagure.io/python-daemon/c/b708912 --- bin/daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/daemon.py b/bin/daemon.py index a548ec6..4cbb22f 100644 --- a/bin/daemon.py +++ b/bin/daemon.py @@ -38,6 +38,7 @@ # # Apache Phoenix note: this file is `daemon.py` from the package # `python-daemon 2.0.5`, https://pypi.python.org/pypi/python-daemon/ +# Backported Python 3.8 fix in PHOENIX-6762 # # The class `PidFile` was added for adapting the `lockfile` package's interface # without depending on yet another 3rd party package. Based on example from @@ -727,9 +728,8 @@ def is_socket(fd): """ result = False - file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW) - try: + file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW) socket_type = file_socket.getsockopt( socket.SOL_SOCKET, socket.SO_TYPE) except socket.error as exc: