From: Serhiy Storchaka Date: Sat, 4 Apr 2015 07:05:48 +0000 (+0300) Subject: Issue #23338: Fixed formatting ctypes error messages on Cygwin. X-Git-Tag: v3.5.0a4~172^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e229e025c5be101fbaaa5ace453fd78e5bffdd1;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 7796cdaff12e..66d340de1684 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -692,6 +692,7 @@ Janne Karila Per Øyvind Karlsen Anton Kasyanov Lou Kates +Makoto Kato Hiroaki Kawai Sebastien Keim Ryan Kelly diff --git a/Misc/NEWS b/Misc/NEWS index 6730e9faa74f..b6e78894f3db 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,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 14ec4ce60c31..558abe398630 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -593,7 +593,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()); @@ -3279,7 +3279,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());