From: Daira Hopwood Date: Fri, 10 Oct 2014 19:36:08 +0000 (+0100) Subject: Don't call filenode.get_size() twice. refs #1634 X-Git-Tag: allmydata-tahoe-1.10.1a1~113 X-Git-Url: https://git.rkrishnan.org/%5B/frontends/%22file:/status?a=commitdiff_plain;h=346b5c4c3d1cf5bed7389936dea72b5204b904ea;p=tahoe-lafs%2Ftahoe-lafs.git Don't call filenode.get_size() twice. refs #1634 Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/web/common.py b/src/allmydata/web/common.py index 2c873206..af5f6d26 100644 --- 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):