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

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


Author: Armin Rigo <arigo at tunes.org>
Branch: release-1.6.x
Changeset: r46538:1b89ebed3a65
Date: 2011-08-16 14:09 +0200
http://bitbucket.org/pypy/pypy/changeset/1b89ebed3a65/

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

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