mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 19:26:25 +00:00
web: survive bogus URIs when displaying sizes
This commit is contained in:
parent
fe3c002842
commit
5b0c9df14c
@ -124,7 +124,11 @@ class Directory(rend.Page):
|
||||
#ctx.fillSlots("uri", T.a(href=dl_uri_url)[html.escape(uri)])
|
||||
|
||||
#extract and display file size
|
||||
ctx.fillSlots("size", unpack_uri(target.get_uri())['size'])
|
||||
try:
|
||||
size = unpack_uri(target.get_uri())['size']
|
||||
except AssertionError:
|
||||
size = "?"
|
||||
ctx.fillSlots("size", size)
|
||||
|
||||
elif IDirectoryNode.providedBy(target):
|
||||
# directory
|
||||
|
Loading…
Reference in New Issue
Block a user