# HG changeset patch # User Sylvain Thénault # Date 1308245908 -7200 # Node ID ae31063f327477890f5e595efbdd88372595d000 # Parent 1f6839019e6a20d4893c90e5fc70a45926e5c3d5 cleanup and assert we don't import unexpected stuff diff -r 1f6839019e6a -r ae31063f3274 server/session.py --- a/server/session.py Thu Jun 16 19:37:59 2011 +0200 +++ b/server/session.py Thu Jun 16 19:38:28 2011 +0200 @@ -270,7 +270,7 @@ def add_relations(self, relations): '''set many relation using a shortcut similar to the one in add_relation - + relations is a list of 2-uples, the first element of each 2-uple is the rtype, and the second is a list of (fromeid, toeid) tuples diff -r 1f6839019e6a -r ae31063f3274 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Thu Jun 16 19:37:59 2011 +0200 +++ b/server/sources/pyrorql.py Thu Jun 16 19:38:28 2011 +0200 @@ -234,6 +234,7 @@ etype, dexturi, dextid = cnx.describe(extid) if dexturi == 'system' or not ( dexturi in self.repo.sources_by_uri or self._skip_externals): + assert etype in self.support_entities, etype return self.repo.extid2eid(self, str(extid), etype, session), True if dexturi in self.repo.sources_by_uri: source = self.repo.sources_by_uri[dexturi]