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:
2004927
)
Don't call filenode.get_size() twice. refs #1634
author
Daira Hopwood
<daira@jacaranda.org>
Fri, 10 Oct 2014 19:36:08 +0000
(20:36 +0100)
committer
Daira Hopwood
<daira@jacaranda.org>
Fri, 10 Oct 2014 19:36:08 +0000
(20:36 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/web/common.py
patch
|
blob
|
history
diff --git
a/src/allmydata/web/common.py
b/src/allmydata/web/common.py
index 2c8732066ba7544d5b2b5bfc0df8f910442ed5df..af5f6d26a7adc41d7cc6527607449c2ae97eceb5 100644
(file)
--- a/
src/allmydata/web/common.py
+++ b/
src/allmydata/web/common.py
@@
-30,8
+30,9
@@
def get_filenode_metadata(filenode):
else:
file_format = "CHK"
metadata['format'] = file_format
- if filenode.get_size() is not None:
- metadata['size'] = filenode.get_size()
+ size = filenode.get_size()
+ if size is not None:
+ metadata['size'] = size
return metadata
class IOpHandleTable(Interface):