Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 071d996

Browse filesBrowse files
[3.13] gh-119253: use ImportError in _ios_support (GH-119254) (#119265)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent 572b0b0 commit 071d996
Copy full SHA for 071d996

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎Lib/_ios_support.py

Copy file name to clipboardExpand all lines: Lib/_ios_support.py
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.