jenkins-bot has submitted this change and it was merged.
Change subject: archivebot.py: count size by bytes instead of the number of characters ......................................................................
archivebot.py: count size by bytes instead of the number of characters
Using UTF-8 encoded bytes conforms with units used on MediaWiki history pages and with the bot's documentations in the script and on-wiki.
Change-Id: I0f1170de4fb9856afbb63aa8e654dac5c9de0884 --- M scripts/archivebot.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py index eea5189..407bd91 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -215,7 +215,7 @@ self.timestamp = max(self.timestamp, timestamp)
def size(self): - return len(self.title) + len(self.content) + 12 + return len(self.title.encode('utf-8')) + len(self.content.encode('utf-8')) + 12
def toText(self): return "== " + self.title + ' ==\n\n' + self.content @@ -291,7 +291,7 @@ return self.full
def size(self): - return len(self.header) + sum([t.size() for t in self.threads]) + return len(self.header.encode('utf-8')) + sum(t.size() for t in self.threads)
def update(self, summary, sortThreads=False): if sortThreads:
pywikibot-commits@lists.wikimedia.org