Skip to content

Commit

Permalink
cleanup: remove MediaWiki dependency in archivebot
Browse files Browse the repository at this point in the history
Bug: T378984
Change-Id: I4a9e271f73c9f2e0fa142a6626ca9559e31d7e39
  • Loading branch information
xqt committed Dec 6, 2024
1 parent 12b04a9 commit 6d30e7b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/archivebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,8 @@ def __init__(self, page, template, salt: str, force: bool = False,
self.timestripper = TimeStripper(site=self.site)

# read maxarticlesize
try:
# keep a gap of 1 KB not to block later changes
self.maxsize = self.site.siteinfo['maxarticlesize'] - 1024
except KeyError: # mw < 1.28
self.maxsize = 2_096_128 # 2 MB - 1 KB gap
# keep a gap of 1 KB not to block later changes
self.maxsize = self.site.siteinfo['maxarticlesize'] - 1024

self.page = DiscussionPage(page, self, keep=keep)
self.comment_params = {
Expand Down

0 comments on commit 6d30e7b

Please sign in to comment.