mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-10 12:20:02 +00:00
Render helper furl prefix
This commit is contained in:
parent
8b4c7296d7
commit
39d616a971
@ -432,17 +432,18 @@ class RootElement(Element):
|
||||
self._render_connection_status(ctx, cs)
|
||||
return ctx.tag
|
||||
|
||||
def data_helper_furl_prefix(self, ctx, data):
|
||||
@renderer
|
||||
def helper_furl_prefix(self, req, tag):
|
||||
try:
|
||||
uploader = self.client.getServiceNamed("uploader")
|
||||
uploader = self._client.getServiceNamed("uploader")
|
||||
except KeyError:
|
||||
return None
|
||||
return tag("None")
|
||||
furl, connected = uploader.get_helper_info()
|
||||
if not furl:
|
||||
return None
|
||||
return tag("None")
|
||||
# trim off the secret swissnum
|
||||
(prefix, _, swissnum) = furl.rpartition("/")
|
||||
return "%s/[censored]" % (prefix,)
|
||||
return tag("%s/[censored]" % (prefix,))
|
||||
|
||||
def _connected_to_helper(self):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user