Browse Source

markpages: Get rid of PageWithTalkPageGenerator

Since redfam.article_generator can yield talkpage with additional
information about redfam and current article from db, we do not need it
anymore.

Related Task: [FS#161](https://fs.golderweb.de/index.php?do=details&task_id=161)
develop
Jonathan Golder 7 years ago
parent
commit
bfec2abf98
  1. 10
      bots/markpages.py

10
bots/markpages.py

@ -145,14 +145,10 @@ class MarkPagesBot( CurrentPageBot ): # sets 'current_page' on each treat()
for redfam in self.redfams: for redfam in self.redfams:
# We need the talkpage (and only this) of each existing page # We need the talkpage (and only this) of each existing page
for talkpage in pagegenerators.PageWithTalkPageGenerator( for talkpage in redfam.article_generator(
redfam.article_generator(
filter_existing=True, filter_existing=True,
exclude_article_status=["marked"] ), exclude_article_status=["marked"],
return_talk_only=True ): talkpages=True ):
# Add reference to redfam to talkpages
talkpage.redfam = redfam
yield talkpage yield talkpage

Loading…
Cancel
Save