From a080c427c80e6195685f43b2f63546a9e4f6efa0 Mon Sep 17 00:00:00 2001 From: db Date: Thu, 28 Aug 2014 09:22:37 -0300 Subject: Fix module import for iterdump method (#2945). The python `pysqlcipher.dbapi2.Connection.iterdump` method is bound to the `pysqlite_connection_iterdump()` function in src/connection.c. This function should import the python `pysqlcipher.dump` module, which contains the function `_iterdump` with the actual implementation of the `pysqlcipher.dbapi2.Connection.iterdump` method. The `pysqlcipher` module was adapted from the `pysqlite2` module. When that was done we forgot to change the import of the `dump` module, which until now was being loaded from the old `pysqlite2` module, instead of being loaded from the correct `pysqlcipher` module. This was a bug and was forcing us to depend on `pysqlite2` to be able to use the `iterdump` method. This commit fixes that bug by loading the correct `pysqlcipher` module in the `pysqlite_connection_iterdump()` function in `src/connection.c`. --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 481b9b5..7e4e96c 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1442,7 +1442,7 @@ pysqlite_connection_iterdump(pysqlite_Connection* self, PyObject* args) goto finally; } - module = PyImport_ImportModule("pysqlite2.dump"); + module = PyImport_ImportModule("pysqlcipher.dump"); if (!module) { goto finally; } -- cgit v1.2.3