[Python-checkins] r59448 - python/trunk/PC/msvcrtmodule.c

christian.heimes python-checkins at python.org
Mon Dec 10 16:39:09 CET 2007


Author: christian.heimes
Date: Mon Dec 10 16:39:09 2007
New Revision: 59448

Modified:
   python/trunk/PC/msvcrtmodule.c
Log:
Stupid save all didn't safe it all ...

Modified: python/trunk/PC/msvcrtmodule.c
==============================================================================
--- python/trunk/PC/msvcrtmodule.c	(original)
+++ python/trunk/PC/msvcrtmodule.c	Mon Dec 10 16:39:09 2007
@@ -214,13 +214,14 @@
 	if (!PyArg_ParseTuple(args, "u#:putwch", &ch, &size))
 		return NULL;
 
-	if (size == 1)
-		_putwch(*ch);
-		Py_RETURN_NONE;
-	else {
+	if (size == 0) {
 		PyErr_SetString(PyExc_ValueError,
-			"Expected unicode of length 1");
+			"Expected unicode string of length 1");
+		return NULL;
 	}
+	_putwch(*ch);
+	Py_RETURN_NONE;
+
 }
 
 static PyObject *


More information about the Python-checkins mailing list