From 75b52cda5c3e57a783d41d2859dfc86a93aefac0 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 17 Mar 2008 13:31:10 -0700 Subject: [PATCH] web/status.py: guard against file_size=None, closes #354 --- src/allmydata/web/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2