https://bugzilla.wikimedia.org/show_bug.cgi?id=68705
Fabian CommodoreFabianus@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |CommodoreFabianus@gmx.de
--- Comment #1 from Fabian CommodoreFabianus@gmx.de --- I'm confused: I don't see a possibility to get the counts without hitting the server. And the server must be hit at least once to get the pages or categories in the “worst case”.
So the previous handling without using 'categoryinfo' seems to be the better solution. Of course it could be written a bit more pythonic by simply using
articles = cat.articles() if articles: # remove them else: # "complain"
Even the change in 'CategoryTreeRobot' should be reverted because the database should be the fasted way to get the number of articles in a category.
By the way database: This seems the only way to avoid hitting the server in the “best case” (|articles| == 0). But 'CategoryMoveRobot' doesn't use the database and it's only used for read-only operations.
But the changes above line 644 (old)/642 (new) look fine to me.
Now of course I'm fairly new to the bot's internals, so my assessment is probably off.