cleanup and assert we don't import unexpected stuff stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 16 Jun 2011 19:38:28 +0200
branchstable
changeset 7526 ae31063f3274
parent 7525 1f6839019e6a
child 7528 11659cbe5eea
cleanup and assert we don't import unexpected stuff
server/session.py
server/sources/pyrorql.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
--- 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]