コード例 #1
0
ファイル: client.py プロジェクト: antagonismorg/tahoe-lafs
 def _got_versioned_introducer(self, publisher):
     self.log("got introducer version: %s" % (publisher.version, ))
     # we require an introducer that speaks at least one of (V1, V2)
     if not (V1 in publisher.version or V2 in publisher.version):
         raise InsufficientVersionError("V1 or V2", publisher.version)
     self._publisher = publisher
     publisher.notifyOnDisconnect(self._disconnected)
     self._maybe_publish()
     self._maybe_subscribe()
コード例 #2
0
 def _got_versioned_introducer(self, publisher):
     self.log("got introducer version: %s" % (publisher.version,))
     # we require a V1 introducer
     needed = "http://allmydata.org/tahoe/protocols/introducer/v1"
     if needed not in publisher.version:
         raise InsufficientVersionError(needed, publisher.version)
     self._publisher = publisher
     publisher.notifyOnDisconnect(self._disconnected)
     self._maybe_publish()
     self._maybe_subscribe()
コード例 #3
0
ファイル: client.py プロジェクト: vrusinov/tahoe-lafs
 def _got_versioned_introducer(self, publisher):
     self.log("got introducer version: %s" % (publisher.version,))
     # we require an introducer that speaks at least V2
     if V2 not in publisher.version:
         raise InsufficientVersionError("V2", publisher.version)
     self._publisher = publisher
     self._since = int(time.time())
     publisher.notifyOnDisconnect(self._disconnected)
     self._maybe_publish()
     self._maybe_subscribe()