diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2024-05-20 20:39:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 20:39:30 (GMT) |
commit | bf17986096491b9ca14c214ed4885340e7857e12 (patch) | |
tree | 1aba8252f4f5528cf1833662e68c36f8705d0e24 /Lib/_ios_support.py | |
parent | 8231a24454c854ea22590fd74733d29e4274122d (diff) | |
download | cpython-bf17986096491b9ca14c214ed4885340e7857e12.zip cpython-bf17986096491b9ca14c214ed4885340e7857e12.tar.gz cpython-bf17986096491b9ca14c214ed4885340e7857e12.tar.bz2 |
gh-119253: use ImportError in _ios_support (#119254)
Diffstat (limited to 'Lib/_ios_support.py')
-rw-r--r-- | Lib/_ios_support.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_ios_support.py b/Lib/_ios_support.py index db3fe23..20467a7 100644 --- a/Lib/_ios_support.py +++ b/Lib/_ios_support.py @@ -5,7 +5,7 @@ except ImportError: # 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, @@ -13,7 +13,7 @@ else: 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 |