Fix redirect.py

I63e1699a4b70dde161c0430beaaa5ed0b44093cb introduced a compile bug.

https://integration.wikimedia.org/ci/job/pywikibot-core-tox-flake8/1022/console

Change-Id: I05394aef3f8293733ffbae453c210dd991872219
01:33:43 ./scripts/redirect.py:813:9: F821 undefined name 'self'
Merge "Fix redirect.py"