mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
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:
parent
582931b1c2
commit
64e344b03a
@ -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)
|
||||
|
@ -477,7 +477,9 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
|
||||
f.close()
|
||||
|
||||
config = "[client]\n"
|
||||
config += "introducer.furl = %s\n" % self.introducer_furl
|
||||
if i != 1:
|
||||
# clients[1] uses private/introducers.yaml, not tahoe.cfg
|
||||
config += "introducer.furl = %s\n" % self.introducer_furl
|
||||
if self.stats_gatherer_furl:
|
||||
config += "stats_gatherer.furl = %s\n" % self.stats_gatherer_furl
|
||||
|
||||
@ -496,6 +498,13 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
|
||||
config += "timeout.keepalive = 600\n"
|
||||
config += "[helper]\n"
|
||||
config += "enabled = True\n"
|
||||
elif i == 1:
|
||||
# clients[1] uses private/introducers.yaml, not tahoe.cfg
|
||||
iyaml = ("introducers:\n"
|
||||
" petname2:\n"
|
||||
" furl: %s\n") % self.introducer_furl
|
||||
iyaml_fn = os.path.join(basedir, "private", "introducers.yaml")
|
||||
fileutil.write(iyaml_fn, iyaml)
|
||||
elif i == 3:
|
||||
# clients[3] runs a webserver and uses a helper
|
||||
config += nodeconfig
|
||||
|
Loading…
x
Reference in New Issue
Block a user