Skip to content

Commit f7fd09d

Browse files
committed
PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+
backport https://pagure.io/python-daemon/c/b708912
1 parent 53509a6 commit f7fd09d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: bin/daemon.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#
3939
# Apache Phoenix note: this file is `daemon.py` from the package
4040
# `python-daemon 2.0.5`, https://pypi.python.org/pypi/python-daemon/
41+
# Backported Python 3.8 fix in PHOENIX-6762
4142
#
4243
# The class `PidFile` was added for adapting the `lockfile` package's interface
4344
# without depending on yet another 3rd party package. Based on example from
@@ -727,9 +728,8 @@ def is_socket(fd):
727728
"""
728729
result = False
729730

730-
file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW)
731-
732731
try:
732+
file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW)
733733
socket_type = file_socket.getsockopt(
734734
socket.SOL_SOCKET, socket.SO_TYPE)
735735
except socket.error as exc:

0 commit comments

Comments
 (0)