[aur-dev] [PATCH 2/3] git-update: Close cursor before closing database
Lukas Fleischer
lfleischer at archlinux.org
Mon Aug 22 06:26:51 UTC 2016
When using SQLite as backend, we need to close the cursor before closing
the database to avoid the following error:
sqlite3.OperationalError: unable to close due to unfinalized statements or unfinished backups
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
git-interface/git-update.py | 1 +
git-interface/test/t0003-update.sh | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index 40d834d..50938c3 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -402,4 +402,5 @@ repo.create_reference('refs/namespaces/' + pkgbase + '/HEAD', sha1_new, True)
update_notify(conn, user, pkgbase_id)
# Close the database.
+cur.close()
conn.close()
diff --git a/git-interface/test/t0003-update.sh b/git-interface/test/t0003-update.sh
index ec830ba..4a45779 100755
--- a/git-interface/test/t0003-update.sh
+++ b/git-interface/test/t0003-update.sh
@@ -368,7 +368,7 @@ test_expect_success 'Pushing a blacklisted package.' '
test_cmp expected actual
'
-test_expect_failure 'Pushing a blacklisted package as Trusted User.' '
+test_expect_success 'Pushing a blacklisted package as Trusted User.' '
old=$(git -C aur.git rev-parse HEAD) &&
test_when_finished "git -C aur.git reset --hard $old" &&
echo "pkgname = forbidden" >>aur.git/.SRCINFO &&
--
2.9.3
More information about the aur-dev
mailing list