Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.4
Changeset: r63191:d2616064a70f
Date: 2013-04-10 00:31 -0400
http://bitbucket.org/pypy/pypy/changeset/d2616064a70f/

Log:    merge default

diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -769,9 +769,9 @@
         if isinstance(name, unicode):
             name = name.encode('utf-8')
         ret = _lib.sqlite3_create_collation(self._db, name,
-                                              _lib.SQLITE_UTF8,
-                                              _ffi.NULL,
-                                              collation_callback)
+                                            _lib.SQLITE_UTF8,
+                                            _ffi.NULL,
+                                            collation_callback)
         if ret != _lib.SQLITE_OK:
             raise self._get_exception(ret)
 
@@ -793,9 +793,7 @@
                     return _lib.SQLITE_DENY
             self.__func_cache[callback] = authorizer
 
-        ret = _lib.sqlite3_set_authorizer(self._db,
-                                          authorizer,
-                                          _ffi.NULL)
+        ret = _lib.sqlite3_set_authorizer(self._db, authorizer, _ffi.NULL)
         if ret != _lib.SQLITE_OK:
             raise self._get_exception(ret)
 
@@ -811,15 +809,13 @@
                 @_ffi.callback("int(void*)")
                 def progress_handler(userdata):
                     try:
-                        ret = callable()
-                        return bool(ret)
+                        return bool(callable())
                     except Exception:
                         # abort query if error occurred
                         return 1
                 self.__func_cache[callable] = progress_handler
-        _lib.sqlite3_progress_handler(self._db, nsteps,
-                                            progress_handler,
-                                            _ffi.NULL)
+        _lib.sqlite3_progress_handler(self._db, nsteps, progress_handler,
+                                      _ffi.NULL)
 
     if sys.version_info[0] >= 3:
         def __get_in_transaction(self):
@@ -901,8 +897,8 @@
     def __check_reset(self):
         if self._reset:
             raise InterfaceError(
-                    "Cursor needed to be reset because of commit/rollback "
-                    "and can no longer be fetched from.")
+                "Cursor needed to be reset because of commit/rollback "
+                "and can no longer be fetched from.")
 
     def __build_row_cast_map(self):
         if not self.__connection._detect_types:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to