From: Brian Warner Date: Mon, 17 Mar 2008 20:31:10 +0000 (-0700) Subject: web/status.py: guard against file_size=None, closes #354 X-Git-Tag: allmydata-tahoe-1.0.0~33 X-Git-Url: https://git.rkrishnan.org/pf/content/de.html?a=commitdiff_plain;h=75b52cda5c3e57a783d41d2859dfc86a93aefac0;p=tahoe-lafs%2Ftahoe-lafs.git web/status.py: guard against file_size=None, closes #354 --- diff --git a/src/allmydata/web/status.py b/src/allmydata/web/status.py index 339c1537..8203e5b1 100644 --- a/src/allmydata/web/status.py +++ b/src/allmydata/web/status.py @@ -465,7 +465,7 @@ class RetrieveStatusPage(rend.Page, RateAndTimeMixin): def _get_rate(self, data, name): file_size = self.retrieve_status.get_size() time = self.retrieve_status.timings.get(name) - if time is None: + if time is None or file_size is None: return None try: return 1.0 * file_size / time