示例#1
0
文件: community.py 项目: duy/tribler
 def _get_channel_community(self, cid):
     assert isinstance(cid, str)
     assert len(cid) == 20
     
     try:
         return self._dispersy.get_community(cid, True)
     except KeyError:
         if __debug__: dprint("join preview community ", cid.encode("HEX"))
         return PreviewChannelCommunity.join_community(DummyMember(cid), self._my_member, self.integrate_with_tribler) 
    def _get_channel_community(self, cid):
        assert isinstance(cid, str)
        assert len(cid) == 20

        try:
            return self._dispersy.get_community(cid, True)
        except KeyError:
            if __debug__: dprint("join preview community ", cid.encode("HEX"))
            return PreviewChannelCommunity.join_community(DummyMember(cid), self._my_member, self.integrate_with_tribler)
示例#3
0
    def _get_channel_community(self, cid):
        assert isinstance(cid, str)
        assert len(cid) == 20

        try:
            return self._dispersy.get_community(cid, True)
        except KeyError:
            logger.debug("join preview community %s", cid.encode("HEX"))
            return PreviewChannelCommunity.join_community(self._dispersy, self._dispersy.get_temporary_member_from_id(cid), self._my_member, self.integrate_with_tribler)
示例#4
0
    def _get_channel_community(self, cid):
        assert isinstance(cid, str)
        assert len(cid) == 20

        try:
            return self._dispersy.get_community(cid, True)
        except KeyError:
            logger.debug("join preview community %s", cid.encode("HEX"))
            return PreviewChannelCommunity.join_community(
                self._dispersy,
                self._dispersy.get_temporary_member_from_id(cid),
                self._my_member, self.integrate_with_tribler)
示例#5
0
 def _get_channel_community(self, cid):
     assert isinstance(cid, str)
     assert len(cid) == 20
     
     try:
         return self._dispersy.get_community(cid, True)
     except KeyError:
         if self.auto_join_channel:
             if __debug__: dprint("join channel community ", cid.encode("HEX"))
             return ChannelCommunity.join_community(Member.get_instance(cid, public_key_available=False), self._my_member, self.integrate_with_tribler)
         else:
             if __debug__: dprint("join preview community ", cid.encode("HEX"))
             return PreviewChannelCommunity.join_community(Member.get_instance(cid, public_key_available=False), self._my_member, self.integrate_with_tribler)