projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f5abe5
)
introweb.py: tolerate non-setLocationed client tubs
author
Brian Warner
<warner@allmydata.com>
Wed, 12 Mar 2008 01:09:13 +0000
(18:09 -0700)
committer
Brian Warner
<warner@allmydata.com>
Wed, 12 Mar 2008 01:09:13 +0000
(18:09 -0700)
src/allmydata/web/introweb.py
patch
|
blob
|
history
diff --git
a/src/allmydata/web/introweb.py
b/src/allmydata/web/introweb.py
index 5a58ca5d08468242a0a1f08b8f7ec5df93cbfd56..8e95dfd583f97d5d6d778dccf2a5626f41020531 100644
(file)
--- 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()