clients now get the queen's pburl from a file named roster_pburl, not hardcoded in...
authorBrian Warner <warner@lothar.com>
Mon, 4 Dec 2006 11:27:40 +0000 (04:27 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 4 Dec 2006 11:27:40 +0000 (04:27 -0700)
allmydata/client.py
client.tac

index f0ecd6e6ce15699a2c982c44cf6a1c69998a1925..122166c3a9d08c41522a437750a7e5d4274f6aba 100644 (file)
@@ -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):
index 16d19dbf9a9743fef213d0f724ecc4a353792683..28dc07486d95c24921a8e4e8f49060a4240d6770 100644 (file)
@@ -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)