mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 19:26:25 +00:00
web/status.py: guard against file_size=None, closes #354
This commit is contained in:
parent
7bc06872ac
commit
75b52cda5c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user