[session] use isinstance instead of testing value of is_super_session since we hack it in the add_relation method stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 17 Aug 2009 12:11:04 +0200
branchstable
changeset 2874 acdd8d8c2cff
parent 2873 51bcd8e8f65c
child 2875 b7399ef8b3e0
[session] use isinstance instead of testing value of is_super_session since we hack it in the add_relation method
server/session.py
--- a/server/session.py	Mon Aug 17 11:06:43 2009 +0200
+++ b/server/session.py	Mon Aug 17 12:11:04 2009 +0200
@@ -330,7 +330,7 @@
         try:
             csession = self._threaddata.childsession
         except AttributeError:
-            if self.is_super_session:
+            if isinstance(self, (ChildSession, InternalSession)):
                 csession = self
             else:
                 csession = ChildSession(self)