jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] Simplify loop in redirect.py

Change-Id: I520bbe3aa7ef4f7317c5051e0ff4b5c6f109dec3
---
M scripts/redirect.py
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/redirect.py b/scripts/redirect.py
index f27ba28..b3089e9 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -275,8 +275,8 @@
for pagetitle in data['query']['pages'].values():
pages[pagetitle['title']] = \
'missing' not in pagetitle or 'pageid' in pagetitle
- for redirect in redirects:
- target = redirects[redirect]
+
+ for redirect, target in redirects.items():
result = None
final = None


To view, visit change 905206. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I520bbe3aa7ef4f7317c5051e0ff4b5c6f109dec3
Gerrit-Change-Number: 905206
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged