server/sources/native.py
changeset 6882 b5e34836f84e
parent 6851 824d5b6eae7f
parent 6850 2b9e58174327
child 6931 0af44a38fe41
--- a/server/sources/native.py	Thu Jan 20 10:10:22 2011 +0100
+++ b/server/sources/native.py	Mon Jan 24 17:02:38 2011 +0100
@@ -849,8 +849,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]