Browse Source

Fix; get_size() rounds to tenths instead of hundreds.

tags/v0.1^2
Ben Kurtovic 13 years ago
parent
commit
7757af58fd
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      bot/tasks/afc_statistics.py

+ 3
- 3
bot/tasks/afc_statistics.py View File

@@ -143,8 +143,8 @@ class Task(BaseTask):
table, where keys are column names and values are their cell contents. table, where keys are column names and values are their cell contents.
""" """
row = "{0}|s={page_status}|t={page_title}|h={page_short}|z={page_size}|" row = "{0}|s={page_status}|t={page_title}|h={page_short}|z={page_size}|"
row += "sr={page_special_user}|sd={page_special_time}|si={page_special_oldid}"
row += "mr={page_modify_user}|md={page_modify_time}|mi={page_modify_oldid}|"
row += "sr={page_special_user}|sd={page_special_time}|si={page_special_oldid}|"
row += "mr={page_modify_user}|md={page_modify_time}|mi={page_modify_oldid}"


page["page_special_time"] = self.format_time(page["page_special_time"]) page["page_special_time"] = self.format_time(page["page_special_time"])
page["page_modify_time"] = self.format_time(page["page_modify_time"]) page["page_modify_time"] = self.format_time(page["page_modify_time"])
@@ -554,7 +554,7 @@ class Task(BaseTask):


def get_size(self, content): def get_size(self, content):
"""Return a page's size in a short, pretty format.""" """Return a page's size in a short, pretty format."""
return "{0} kB".format(round(len(content) / 1000.0, 2))
return "{0} kB".format(round(len(content) / 1000.0, 1))


def get_modify(self, pageid): def get_modify(self, pageid):
"""Return information about a page's last edit ("modification"). """Return information about a page's last edit ("modification").


Loading…
Cancel
Save