server/sources/native.py
changeset 7646 91a984ba420f
parent 7645 cb2459aaa7d7
child 7754 e3da9e7fc584
equal deleted inserted replaced
7645:cb2459aaa7d7 7646:91a984ba420f
   848 
   848 
   849     # system source interface #################################################
   849     # system source interface #################################################
   850 
   850 
   851     def _eid_type_source(self, session, eid, sql, _retry=True):
   851     def _eid_type_source(self, session, eid, sql, _retry=True):
   852         try:
   852         try:
   853             return self.doexec(session, sql).fetchone()
   853             res = self.doexec(session, sql).fetchone()
       
   854             if res is not None:
       
   855                 return res
   854         except (self.OperationalError, self.InterfaceError):
   856         except (self.OperationalError, self.InterfaceError):
   855             if session.mode == 'read' and _retry:
   857             if session.mode == 'read' and _retry:
   856                 self.warning("trying to reconnect (eid_type_source())")
   858                 self.warning("trying to reconnect (eid_type_source())")
   857                 session.cnxset.reconnect(self)
   859                 session.cnxset.reconnect(self)
   858                 return self._eid_type_source(session, eid, sql, _retry=False)
   860                 return self._eid_type_source(session, eid, sql, _retry=False)