server/sources/native.py
changeset 6882 b5e34836f84e
parent 6851 824d5b6eae7f
parent 6850 2b9e58174327
child 6931 0af44a38fe41
equal deleted inserted replaced
6856:ac092197c099 6882:b5e34836f84e
   847         # needed for the recursive handling of disconnections (otherwise we
   847         # needed for the recursive handling of disconnections (otherwise we
   848         # deadlock on self._eid_creation_lock
   848         # deadlock on self._eid_creation_lock
   849         if self._eid_creation_cnx is None:
   849         if self._eid_creation_cnx is None:
   850             self._eid_creation_cnx = self.get_connection()
   850             self._eid_creation_cnx = self.get_connection()
   851         cnx = self._eid_creation_cnx
   851         cnx = self._eid_creation_cnx
   852         cursor = cnx.cursor()
   852         try:
   853         try:
   853             cursor = cnx.cursor()
   854             for sql in self.dbhelper.sqls_increment_sequence('entities_id_seq'):
   854             for sql in self.dbhelper.sqls_increment_sequence('entities_id_seq'):
   855                 cursor.execute(sql)
   855                 cursor.execute(sql)
   856             eid = cursor.fetchone()[0]
   856             eid = cursor.fetchone()[0]
   857         except (self.OperationalError, self.InterfaceError):
   857         except (self.OperationalError, self.InterfaceError):
   858             # FIXME: better detection of deconnection pb
   858             # FIXME: better detection of deconnection pb