This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit 801c4c5545f99b6ef7fbf42804aa87cafca29762
Author: Greg Stein <[email protected]>
AuthorDate: Mon May 30 18:42:31 2022 -0500

    close this cursor, to release a db lock
---
 v3/steve/db.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/v3/steve/db.py b/v3/steve/db.py
index 0e03777..884dc93 100644
--- a/v3/steve/db.py
+++ b/v3/steve/db.py
@@ -65,6 +65,7 @@ class DB:
         # Get all column names for TABLE.
         self.name_cursor.execute(f'select * from {table} limit 1')
         names = [ info[0] for info in self.name_cursor.description ]
+        self.name_cursor.close()  # we don't need the results
 
         # Create a factory for turning rows into namedtuples.
         factory = collections.namedtuple(f'row_factory_{len(self.factories)}',

Reply via email to