mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 09:48:56 +00:00
introweb.py: tolerate non-setLocationed client tubs
This commit is contained in:
parent
3f5abe5cba
commit
fd5a922cad
@ -68,7 +68,11 @@ class IntroducerRoot(rend.Page):
|
|||||||
(service_name, rref) = s
|
(service_name, rref) = s
|
||||||
sr = rref.getSturdyRef()
|
sr = rref.getSturdyRef()
|
||||||
nodeid = sr.tubID
|
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]
|
advertised = [loc.split(":")[0] for loc in sr.locationHints]
|
||||||
ctx.fillSlots("advertised", " ".join(advertised))
|
ctx.fillSlots("advertised", " ".join(advertised))
|
||||||
remote_host = rref.tracker.broker.transport.getPeer()
|
remote_host = rref.tracker.broker.transport.getPeer()
|
||||||
|
Loading…
Reference in New Issue
Block a user