Stringify tag parameters

This commit is contained in:
Sajith Sasidharan 2020-05-07 10:55:08 -04:00
parent de41302743
commit a544e8a55f

View File

@ -712,7 +712,7 @@ class RetrieveStatusElement(Element, RateAndTimeMixin):
@renderer @renderer
def current_size(self, req, tag): def current_size(self, req, tag):
size = self._retrieve_status.get_size() size = str(self._retrieve_status.get_size())
if size is None: if size is None:
size = "(unknown)" size = "(unknown)"
return tag(size) return tag(size)
@ -750,35 +750,35 @@ class RetrieveStatusElement(Element, RateAndTimeMixin):
@renderer @renderer
def time_total(self, req, tag): def time_total(self, req, tag):
return tag(self._retrieve_status.timings.get("total")) return tag(str(self._retrieve_status.timings.get("total")))
@renderer @renderer
def rate_total(self, req, tag): def rate_total(self, req, tag):
return tag(self._get_rate("total")) return tag(str(self._get_rate("total")))
@renderer @renderer
def time_fetch(self, req, tag): def time_fetch(self, req, tag):
return tag(self._retrieve_status.timings.get("fetch")) return tag(str(self._retrieve_status.timings.get("fetch")))
@renderer @renderer
def rate_fetch(self, req, tag): def rate_fetch(self, req, tag):
return tag(self._get_rate("fetch")) return tag(str(self._get_rate("fetch")))
@renderer @renderer
def time_decode(self, req, tag): def time_decode(self, req, tag):
return tag(self._retrieve_status.timings.get("decode")) return tag(str(self._retrieve_status.timings.get("decode")))
@renderer @renderer
def rate_decode(self, req, tag): def rate_decode(self, req, tag):
return tag(self._get_rate("decode")) return tag(str(self._get_rate("decode")))
@renderer @renderer
def time_decrypt(self, req, tag): def time_decrypt(self, req, tag):
return tag(self._retrieve_status.timings.get("decrypt")) return tag(str(self._retrieve_status.timings.get("decrypt")))
@renderer @renderer
def rate_decrypt(self, req, tag): def rate_decrypt(self, req, tag):
return tag(self._get_rate("decrypt")) return tag(str(self._get_rate("decrypt")))
@renderer @renderer
def server_timings(self, req, tag): def server_timings(self, req, tag):