From fd5a922cadbc3724bcc37cb84e4f0ee01a2625a5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 11 Mar 2008 18:09:13 -0700 Subject: [PATCH] introweb.py: tolerate non-setLocationed client tubs --- src/allmydata/web/introweb.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() -- 2.45.2