From 19ec51cd63616c3fd14b481bd05a78f07704adc1 Mon Sep 17 00:00:00 2001 From: Chris Liechti Date: Wed, 16 Sep 2020 11:16:11 +0200 Subject: list_ports: use hardcoded path to library on osx due to a security related change on MacOS, find_library fails. which may eventually be fixed with a Python update but it also does not hurt to use the full paths now, that should work on old and new systems. related to #509 #518 --- serial/tools/list_ports_osx.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/serial/tools/list_ports_osx.py b/serial/tools/list_ports_osx.py index 34a7f5a..0c719db 100644 --- a/serial/tools/list_ports_osx.py +++ b/serial/tools/list_ports_osx.py @@ -24,12 +24,11 @@ from __future__ import absolute_import import ctypes -import ctypes.util from serial.tools import list_ports_common -iokit = ctypes.cdll.LoadLibrary(ctypes.util.find_library('IOKit')) -cf = ctypes.cdll.LoadLibrary(ctypes.util.find_library('CoreFoundation')) +iokit = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/IOKit.framework/IOKit') +cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation') kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault") kCFAllocatorDefault = ctypes.c_void_p.in_dll(cf, "kCFAllocatorDefault") -- cgit v1.2.1