jenkins-bot has submitted this change and it was merged.

Change subject: interwiki.py: fix how it uses page.put
......................................................................


interwiki.py: fix how it uses page.put

HTTP codes are not returned by page.put.

Change-Id: If1215c9b90d933b9aa8ee9672ec49b351f91acdf
---
M scripts/interwiki.py
1 file changed, 2 insertions(+), 7 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 772ef0e..6e42037 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1984,9 +1984,8 @@
                 try:
                     if globalvar.async:
                         page.put_async(newtext, comment=mcomment)
-                        status = 302
                     else:
-                        status, reason, data = page.put(newtext, 
comment=mcomment)
+                        page.put(newtext, comment=mcomment)
                 except pywikibot.LockedPage:
                     pywikibot.output(u'Page %s is locked. Skipping.' % page)
                     raise SaveError(u'Locked')
@@ -2020,11 +2019,7 @@
                     time.sleep(timeout)
                 else:
                     break
-            if str(status) == '302':
-                return True
-            else:
-                pywikibot.output(u'%s %s' % (status, reason))
-                return False
+            return True
         elif answer == 'g':
             raise GiveUpOnPage(u'User asked us to give up')
         else:

-- 
To view, visit https://gerrit.wikimedia.org/r/132711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1215c9b90d933b9aa8ee9672ec49b351f91acdf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Whym <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to