# HG changeset patch # User Sylvain Thénault # Date 1295456488 -3600 # Node ID 2b9e5817432720679c870f39b2ce72ea0fff77dc # Parent 4dd1df437e15b0b34c8c04373740be9c8ab6e626 [repo] move cursor creation into the try/except, it may raises an InterfaceError if the connection is closed diff -r 4dd1df437e15 -r 2b9e58174327 server/sources/native.py --- 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]