diff --git a/newsfragments/3975.minor b/newsfragments/3975.minor new file mode 100644 index 000000000..08fba6dd6 --- /dev/null +++ b/newsfragments/3975.minor @@ -0,0 +1 @@ +Fixes truthy conditional in status.py \ No newline at end of file diff --git a/src/allmydata/web/status.py b/src/allmydata/web/status.py index 65647f491..a413348c4 100644 --- a/src/allmydata/web/status.py +++ b/src/allmydata/web/status.py @@ -550,7 +550,7 @@ class DownloadStatusElement(Element): length = r_ev["length"] bytes_returned = r_ev["bytes_returned"] decrypt_time = "" - if bytes: + if bytes_returned is not None: decrypt_time = self._rate_and_time(bytes_returned, r_ev["decrypt_time"]) speed, rtt = "","" if r_ev["finish_time"] is not None: