server/repository.py
branchstable
changeset 7064 b8ce2266d026
parent 6889 37668bf302f5
child 7068 90ddf608fe2b
child 7083 b8e35cde46e9
equal deleted inserted replaced
7063:b07ee816bffb 7064:b8ce2266d026
   541         _, sourceuri, extid = self.type_and_source_from_eid(foreid)
   541         _, sourceuri, extid = self.type_and_source_from_eid(foreid)
   542         if sourceuri == 'system':
   542         if sourceuri == 'system':
   543             return self.config[option]
   543             return self.config[option]
   544         pool = self._get_pool()
   544         pool = self._get_pool()
   545         try:
   545         try:
   546             return pool.connection(sourceuri).get_option_value(option, extid)
   546             cnx = pool.connection(sourceuri)
       
   547             # needed to check connection is valid and usable by the current
       
   548             # thread
       
   549             newcnx = self.sources_by_uri[sourceuri].check_connection(cnx)
       
   550             if newcnx is not None:
       
   551                 cnx = newcnx
       
   552             return cnx.get_option_value(option, extid)
   547         finally:
   553         finally:
   548             self._free_pool(pool)
   554             self._free_pool(pool)
   549 
   555 
   550     @cached
   556     @cached
   551     def get_versions(self, checkversions=False):
   557     def get_versions(self, checkversions=False):