introducer.yaml: ascii-fy furls before use

This fixes the foolscap-rejects-unicode-furls problem which prevented a
correctly-formatted introducers.yaml from working.

closes ticket:2862
This commit is contained in:
Brian Warner
2017-01-08 15:18:28 -08:00
parent 582931b1c2
commit 64e344b03a
2 changed files with 13 additions and 3 deletions

View File

@ -265,11 +265,12 @@ class Client(node.Node, pollmixin.PollMixin):
for petname, introducer in introducers.items():
introducer_cache_filepath = FilePath(os.path.join(self.basedir, "private", "introducer_{}_cache.yaml".format(petname)))
ic = IntroducerClient(self.tub, introducer['furl'],
ic = IntroducerClient(self.tub, introducer['furl'].encode("ascii"),
self.nickname,
str(allmydata.__full_version__),
str(self.OLDEST_SUPPORTED_VERSION),
self.get_app_versions(), self._sequencer, introducer_cache_filepath)
self.get_app_versions(), self._sequencer,
introducer_cache_filepath)
self.introducer_clients.append(ic)
self.introducer_furls.append(introducer['furl'])
ic.setServiceParent(self)