From: Serhiy Storchaka Date: Sat, 4 Apr 2015 07:05:35 +0000 (+0300) Subject: Issue #23338: Fixed formatting ctypes error messages on Cygwin. X-Git-Tag: v2.7.10rc1~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37943b07fe6a76a4cda189b9772d57dab7839311;p=thirdparty%2FPython%2Fcpython.git Issue #23338: Fixed formatting ctypes error messages on Cygwin. Patch by Makoto Kato. --- diff --git a/Misc/ACKS b/Misc/ACKS index a3455b65807b..af84d0993b12 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -685,6 +685,7 @@ Janne Karila Per Øyvind Karlsen Anton Kasyanov Lou Kates +Makoto Kato Hiroaki Kawai Brian Kearns Sebastien Keim diff --git a/Misc/NEWS b/Misc/NEWS index 514c2dadbcb1..783bf8821c05 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -21,6 +21,9 @@ Core and Builtins Library ------- +- Issue #23338: Fixed formatting ctypes error messages on Cygwin. + Patch by Makoto Kato. + - Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and arbitrary precision integers added in Tcl 8.5. diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 555600d4fc5c..96ffa9d9a82c 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -642,7 +642,7 @@ CDataType_in_dll(PyObject *type, PyObject *args) #ifdef __CYGWIN__ /* dlerror() isn't very helpful on cygwin */ PyErr_Format(PyExc_ValueError, - "symbol '%s' not found (%s) ", + "symbol '%s' not found", name); #else PyErr_SetString(PyExc_ValueError, ctypes_dlerror()); @@ -3393,7 +3393,7 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds) #ifdef __CYGWIN__ /* dlerror() isn't very helpful on cygwin */ PyErr_Format(PyExc_AttributeError, - "function '%s' not found (%s) ", + "function '%s' not found", name); #else PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());