[Python-checkins] cpython (2.7): Issue #23338: Fixed formatting ctypes error messages on Cygwin.

serhiy.storchaka python-checkins at python.org
Sat Apr 4 09:07:43 CEST 2015


https://hg.python.org/cpython/rev/1f28c8cca671
changeset:   95429:1f28c8cca671
branch:      2.7
parent:      95426:912719dd684f
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sat Apr 04 10:05:35 2015 +0300
summary:
  Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.

files:
  Misc/ACKS                 |  1 +
  Misc/NEWS                 |  3 +++
  Modules/_ctypes/_ctypes.c |  4 ++--
  3 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -685,6 +685,7 @@
 Per Øyvind Karlsen
 Anton Kasyanov
 Lou Kates
+Makoto Kato
 Hiroaki Kawai
 Brian Kearns
 Sebastien Keim
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,9 @@
 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
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -642,7 +642,7 @@
 #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 @@
 #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());

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list