equal
deleted
inserted
replaced
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 |