8000 gh-119253: use ImportError in _ios_support by hauntsaninja · Pull Request #119254 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119253: use ImportError in _ios_support #119254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-119253: use ImportError in _ios_support
  • Loading branch information
hauntsaninja committed May 20, 2024
commit 54741fa92a89564af90e847094e428c7920ce674
4 changes: 2 additions & 2 deletions Lib/_ios_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
# ctypes is an optional module. If it's not present, we're limited in what
# we can tell about the system, but we don't want to prevent the module
# from working.
print("ctypes isn't available; iOS system calls will not be available")
print("ctypes isn't available; iOS system calls will not be available", file=sys.stderr)
objc = None
else:
# ctypes is available. Load the ObjC library, and wrap the objc_getClass,
# sel_registerName methods
lib = util.find_library("objc")
if lib is None:
# Failed to load the objc library
raise RuntimeError("ObjC runtime library couldn't be loaded")
raise ImportError("ObjC runtime library couldn't be loaded")

objc = cdll.LoadLibrary(lib)
objc.objc_getClass.restype = c_void_p
Expand Down
0