[pypy-commit] pypy default: A bug and fix by mithrandi. No test; I just checked manually with

arigo noreply at buildbot.pypy.org
Tue Aug 16 14:05:15 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r46537:6c1a9945506d
Date: 2011-08-16 14:09 +0200
http://bitbucket.org/pypy/pypy/changeset/6c1a9945506d/

Log:	A bug and fix by mithrandi. No test; I just checked manually with
	the example shown at https://bugs.pypy.org/issue809 .

diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -724,13 +724,12 @@
             self.statement.reset()
             raise self.connection._get_exception(ret)
 
-        if self.statement.kind == "DQL":
-            if ret == SQLITE_ROW:
-                self.statement._build_row_cast_map()
-                self.statement._readahead()
-            else:
-                self.statement.item = None
-                self.statement.exhausted = True
+        if self.statement.kind == "DQL"and ret == SQLITE_ROW:
+            self.statement._build_row_cast_map()
+            self.statement._readahead()
+        else:
+            self.statement.item = None
+            self.statement.exhausted = True
 
         if self.statement.kind in ("DML", "DDL"):
             self.statement.reset()


More information about the pypy-commit mailing list