[repo] move cursor creation into the try/except, it may raises an InterfaceError if the connection is closed
--- a/server/sources/native.py Wed Jan 19 12:42:50 2011 +0100
+++ b/server/sources/native.py Wed Jan 19 18:01:28 2011 +0100
@@ -843,8 +843,8 @@
if self._eid_creation_cnx is None:
self._eid_creation_cnx = self.get_connection()
cnx = self._eid_creation_cnx
- cursor = cnx.cursor()
try:
+ cursor = cnx.cursor()
for sql in self.dbhelper.sqls_increment_sequence('entities_id_seq'):
cursor.execute(sql)
eid = cursor.fetchone()[0]