summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordb <drebs@riseup.net>2014-08-28 09:22:37 -0300
committerdb <drebs@riseup.net>2014-08-28 09:27:28 -0300
commita080c427c80e6195685f43b2f63546a9e4f6efa0 (patch)
treeef4844eb5f6080bd0ce5e19ee9b2f2c478285346
parent4118fec5ceb4bda79b1c117c95b378551163ab8b (diff)
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`.
-rw-r--r--src/connection.c2
1 files changed, 1 insertions, 1 deletions
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;
}