Commits

Armin Rigo  committed 1b89ebe

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)

  • Participants
  • Parent commits a4e9e37
  • Branches release-1.6.x

Comments (0)

Files changed (1)

File lib_pypy/_sqlite3.py

             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()