Fixes bad practice of naming variable a built-in type
This commit is contained in:
parent
19e58f19ca
commit
b7cadfc53a
|
@ -0,0 +1 @@
|
|||
Fixes variable name same as built-in type.
|
|
@ -1616,30 +1616,30 @@ class StatisticsElement(Element):
|
|||
@renderer
|
||||
def uploads(self, req, tag):
|
||||
files = self._stats["counters"].get("uploader.files_uploaded", 0)
|
||||
bytes = self._stats["counters"].get("uploader.bytes_uploaded", 0)
|
||||
bytes_uploaded = self._stats["counters"].get("uploader.bytes_uploaded", 0)
|
||||
return tag(("%s files / %s bytes (%s)" %
|
||||
(files, bytes, abbreviate_size(bytes))))
|
||||
(files, bytes_uploaded, abbreviate_size(bytes_uploaded))))
|
||||
|
||||
@renderer
|
||||
def downloads(self, req, tag):
|
||||
files = self._stats["counters"].get("downloader.files_downloaded", 0)
|
||||
bytes = self._stats["counters"].get("downloader.bytes_downloaded", 0)
|
||||
bytes_uploaded = self._stats["counters"].get("downloader.bytes_downloaded", 0)
|
||||
return tag("%s files / %s bytes (%s)" %
|
||||
(files, bytes, abbreviate_size(bytes)))
|
||||
(files, bytes_uploaded, abbreviate_size(bytes_uploaded)))
|
||||
|
||||
@renderer
|
||||
def publishes(self, req, tag):
|
||||
files = self._stats["counters"].get("mutable.files_published", 0)
|
||||
bytes = self._stats["counters"].get("mutable.bytes_published", 0)
|
||||
return tag("%s files / %s bytes (%s)" % (files, bytes,
|
||||
abbreviate_size(bytes)))
|
||||
bytes_uploaded = self._stats["counters"].get("mutable.bytes_published", 0)
|
||||
return tag("%s files / %s bytes (%s)" % (files, bytes_uploaded,
|
||||
abbreviate_size(bytes_uploaded)))
|
||||
|
||||
@renderer
|
||||
def retrieves(self, req, tag):
|
||||
files = self._stats["counters"].get("mutable.files_retrieved", 0)
|
||||
bytes = self._stats["counters"].get("mutable.bytes_retrieved", 0)
|
||||
return tag("%s files / %s bytes (%s)" % (files, bytes,
|
||||
abbreviate_size(bytes)))
|
||||
bytes_uploaded = self._stats["counters"].get("mutable.bytes_retrieved", 0)
|
||||
return tag("%s files / %s bytes (%s)" % (files, bytes_uploaded,
|
||||
abbreviate_size(bytes_uploaded)))
|
||||
|
||||
@renderer
|
||||
def raw(self, req, tag):
|
||||
|
|
Loading…
Reference in New Issue