mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 16:58:10 +00:00
add more 'with' statements
This commit is contained in:
parent
a348d3d507
commit
5071ddf124
@ -543,16 +543,16 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
|
|||||||
self.clients.append(c)
|
self.clients.append(c)
|
||||||
c.set_default_mutable_keysize(TEST_RSA_KEY_SIZE)
|
c.set_default_mutable_keysize(TEST_RSA_KEY_SIZE)
|
||||||
|
|
||||||
f = open(os.path.join(basedirs[0],"private","helper.furl"), "r")
|
with open(os.path.join(basedirs[0],"private","helper.furl"), "r") as f:
|
||||||
helper_furl = f.read()
|
helper_furl = f.read()
|
||||||
f.close()
|
|
||||||
self.helper_furl = helper_furl
|
self.helper_furl = helper_furl
|
||||||
if self.numclients >= 4:
|
if self.numclients >= 4:
|
||||||
f = open(os.path.join(basedirs[3], 'tahoe.cfg'), 'ab+')
|
with open(os.path.join(basedirs[3], 'tahoe.cfg'), 'ab+') as f:
|
||||||
f.write(
|
f.write(
|
||||||
"[client]\n"
|
"[client]\n"
|
||||||
"helper.furl = %s\n" % helper_furl)
|
"helper.furl = {}\n".format(helper_furl)
|
||||||
f.close()
|
)
|
||||||
|
|
||||||
# this starts the rest of the clients
|
# this starts the rest of the clients
|
||||||
for i in range(1, self.numclients):
|
for i in range(1, self.numclients):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user