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()
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()
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()