From: Brian Warner Date: Wed, 12 Mar 2008 01:09:13 +0000 (-0700) Subject: introweb.py: tolerate non-setLocationed client tubs X-Git-Tag: allmydata-tahoe-0.9.0~15 X-Git-Url: https://git.rkrishnan.org/components/?a=commitdiff_plain;h=fd5a922cadbc3724bcc37cb84e4f0ee01a2625a5;p=tahoe-lafs%2Ftahoe-lafs.git introweb.py: tolerate non-setLocationed client tubs --- diff --git a/src/allmydata/web/introweb.py b/src/allmydata/web/introweb.py index 5a58ca5d..8e95dfd5 100644 --- a/src/allmydata/web/introweb.py +++ b/src/allmydata/web/introweb.py @@ -68,7 +68,11 @@ class IntroducerRoot(rend.Page): (service_name, rref) = s sr = rref.getSturdyRef() nodeid = sr.tubID - ctx.fillSlots("peerid", "%s" % idlib.nodeid_b2a(nodeid)) + # if the subscriber didn't do Tub.setLocation, nodeid will be None + nodeid_s = "?" + if nodeid: + nodeid_s = idlib.nodeid_b2a(nodeid) + ctx.fillSlots("peerid", nodeid_s) advertised = [loc.split(":")[0] for loc in sr.locationHints] ctx.fillSlots("advertised", " ".join(advertised)) remote_host = rref.tracker.broker.transport.getPeer()