Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1267:28f10889b5aa
Date: 2013-06-04 13:16 +0200
http://bitbucket.org/cffi/cffi/changeset/28f10889b5aa/
Log: Propagate the original OSError, which contains information returned
by dlerror().
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -361,13 +361,13 @@
backend = ffi._backend
try:
if '.' not in name and '/' not in name:
- raise OSError
+ raise OSError("library not found: %r" % (name,))
backendlib = backend.load_library(name, flags)
except OSError:
import ctypes.util
path = ctypes.util.find_library(name)
if path is None:
- raise OSError("library not found: %r" % (name,))
+ raise # propagate the original OSError
backendlib = backend.load_library(path, flags)
copied_enums = []
#
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit