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:
fe3c002
)
web: survive bogus URIs when displaying sizes
author
Brian Warner
<warner@lothar.com>
Sun, 8 Jul 2007 04:31:18 +0000
(21:31 -0700)
committer
Brian Warner
<warner@lothar.com>
Sun, 8 Jul 2007 04:31:18 +0000
(21:31 -0700)
src/allmydata/webish.py
patch
|
blob
|
history
diff --git
a/src/allmydata/webish.py
b/src/allmydata/webish.py
index 4f675f543d14a16988ccfc32a357154635e1fc34..2951787baf609458d8450415a4724964aa7cb261 100644
(file)
--- a/
src/allmydata/webish.py
+++ b/
src/allmydata/webish.py
@@
-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