# HG changeset patch # User Aurelien Campeas # Date 1401702450 -7200 # Node ID 029f9eafe5749b752ede758cec6b3cff1c94fd9d # Parent 5362310d46daefae6958f0623b825f3cdb716ed3 [repository] session -> cnx renaming (already done in the source object) diff -r 5362310d46da -r 029f9eafe574 server/repository.py --- a/server/repository.py Fri May 30 17:57:55 2014 +0200 +++ b/server/repository.py Mon Jun 02 11:47:30 2014 +0200 @@ -941,7 +941,7 @@ # * correspondance between eid and (type, source) # * correspondance between eid and local id (i.e. specific to a given source) - def type_and_source_from_eid(self, eid, session): + def type_and_source_from_eid(self, eid, cnx): """return a tuple `(type, extid, actual source uri)` for the entity of the given `eid` """ @@ -952,8 +952,7 @@ try: return self._type_source_cache[eid] except KeyError: - etype, extid, auri = self.system_source.eid_type_source(session, - eid) + etype, extid, auri = self.system_source.eid_type_source(cnx, eid) self._type_source_cache[eid] = (etype, extid, auri) return etype, extid, auri @@ -971,9 +970,9 @@ rqlcache.pop( ('Any X WHERE X eid %s' % eid,), None) self.system_source.clear_eid_cache(eid, etype) - def type_from_eid(self, eid, session): + def type_from_eid(self, eid, cnx): """return the type of the entity with id """ - return self.type_and_source_from_eid(eid, session)[0] + return self.type_and_source_from_eid(eid, cnx)[0] def querier_cache_key(self, session, rql, args, eidkeys): cachekey = [rql]