Skip to content

Commit

Permalink
PHOENIX-6762 Phoenix QueryServer cannot run correctly with python 3.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
stoty committed Aug 8, 2022
1 parent 53509a6 commit f7fd09d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f7fd09d

Please sign in to comment.