From: Brian Warner Date: Mon, 4 Dec 2006 11:27:40 +0000 (-0700) Subject: clients now get the queen's pburl from a file named roster_pburl, not hardcoded in... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~464 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/%5B%5E?a=commitdiff_plain;h=5be523076784b689c1d63ec1c5dc4e7dfd277593;p=tahoe-lafs%2Ftahoe-lafs.git clients now get the queen's pburl from a file named roster_pburl, not hardcoded in the .tac file --- diff --git a/allmydata/client.py b/allmydata/client.py index f0ecd6e6..122166c3 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -23,6 +23,7 @@ class Client(node.Node, Referenceable): STOREDIR = 'storage' NODETYPE = "client" WEBPORTFILE = "webport" + QUEEN_PBURL_FILE = "roster_pburl" def __init__(self, basedir="."): node.Node.__init__(self, basedir) @@ -40,6 +41,11 @@ class Client(node.Node, Referenceable): f.close() self.add_service(WebishServer(webport)) self.queen_pburl = None + QUEEN_PBURL_FILE = os.path.join(self.basedir, self.QUEEN_PBURL_FILE) + if os.path.exists(QUEEN_PBURL_FILE): + f = open(QUEEN_PBURL_FILE, "r") + self.queen_pburl = f.read().strip() + f.close() self.queen_connector = None def tub_ready(self): diff --git a/client.tac b/client.tac index 16d19dbf..28dc0748 100644 --- a/client.tac +++ b/client.tac @@ -3,11 +3,7 @@ from allmydata import client from twisted.application import service -queen_pburl = "pb://jekyv6ghn7zinppk7wcvfmk7o4gw76hb@192.168.1.101:42552/roster" -yumyum_queen = "pb://cznyjh2pi4bybn3g7pi36bdfnwz356vk@192.168.1.98:56510/roster" c = client.Client() -c.set_queen_pburl(yumyum_queen) -#c.set_queen_pburl(queen_pburl) application = service.Application("allmydata_client") c.setServiceParent(application)