diff Modules/_stringio.c @ 49360:1f4ea0229ec6

Fix a probable merge glitch in r66695: a redundant check that actually belongs to another function.
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Tue, 30 Sep 2008 20:22:44 +0000
parents 598d19936186
children 87fbbf22adf3
line wrap: on
line diff
--- a/Modules/_stringio.c	Tue Sep 30 02:22:04 2008 +0000
+++ b/Modules/_stringio.c	Tue Sep 30 20:22:44 2008 +0000
@@ -140,6 +140,8 @@
 
     if (PyLong_Check(arg)) {
         size = PyLong_AsSsize_t(arg);
+        if (size == -1 && PyErr_Occurred())
+            return NULL;
     }
     else if (arg == Py_None) {
         /* Read until EOF is reached, by default. */
@@ -179,8 +181,6 @@
         size = PyLong_AsSsize_t(arg);
         if (size == -1 && PyErr_Occurred())
             return NULL;
-        if (size == -1 && PyErr_Occurred())
-            return NULL;
     }
     else if (arg == Py_None) {
         /* Truncate to current position if no argument is passed. */