HomePhabricator

[bugfix] check for {{bots}}/{{nobots}} for original wiki text first

Description

[bugfix] check for {{bots}}/{{nobots}} for original wiki text first

{{bots}}/{{nobots}} templates are checked for Page.text whenever the
Page is saved but this does not work if the text was changed and these
templates are removed. Therefore check for these templates with the
first get() statement and save the result.

Also print the exception in category_redirect.py and decrease nested
flow statements.

Tests added-

Bug: T262136
Change-Id: I6acaccaf654c32ec501a825b3fd2c7010e824583