From 61e3861de6719d2a869bb9202c9694fb34e73799 Mon Sep 17 00:00:00 2001 From: Morgan Epp <60796713+epmog@users.noreply.github.com> Date: Wed, 28 Feb 2024 19:31:01 -0600 Subject: [PATCH] fix: remove relative import since client can't handle it Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com> --- src/openjd/adaptor_runtime_client/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openjd/adaptor_runtime_client/connection.py b/src/openjd/adaptor_runtime_client/connection.py index cfc7f30..ff65224 100644 --- a/src/openjd/adaptor_runtime_client/connection.py +++ b/src/openjd/adaptor_runtime_client/connection.py @@ -5,9 +5,9 @@ import socket as _socket import ctypes as _ctypes import os as _os +from sys import platform from typing import Any from http.client import HTTPConnection as _HTTPConnection -from ..adaptor_runtime._osname import OSName class UnrecognizedBackgroundConnectionError(Exception): @@ -86,7 +86,7 @@ def _authenticate(self) -> bool: peercred_opt_level: Any peercred_opt: Any cred_cls: Any - if OSName.is_macos(): + if platform == "darwin": # SOL_LOCAL is not defined in Python's socket module, need to hardcode it # source: https://github.com/apple-oss-distributions/xnu/blob/1031c584a5e37aff177559b9f69dbd3c8c3fd30a/bsd/sys/un.h#L85 peercred_opt_level = 0 # type: ignore[attr-defined]