Skip to content

Commit 071d996

Browse files
[3.13] gh-119253: use ImportError in _ios_support (GH-119254) (#119265)
Co-authored-by: Shantanu <[email protected]>
1 parent 572b0b0 commit 071d996

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/_ios_support.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# ctypes is an optional module. If it's not present, we're limited in what
66
# we can tell about the system, but we don't want to prevent the module
77
# from working.
8-
print("ctypes isn't available; iOS system calls will not be available")
8+
print("ctypes isn't available; iOS system calls will not be available", file=sys.stderr)
99
objc = None
1010
else:
1111
# ctypes is available. Load the ObjC library, and wrap the objc_getClass,
1212
# sel_registerName methods
1313
lib = util.find_library("objc")
1414
if lib is None:
1515
# Failed to load the objc library
16-
raise RuntimeError("ObjC runtime library couldn't be loaded")
16+
raise ImportError("ObjC runtime library couldn't be loaded")
1717

1818
objc = cdll.LoadLibrary(lib)
1919
objc.objc_getClass.restype = c_void_p

0 commit comments

Comments
 (0)