jenkins-bot has submitted this change and it was merged.
Change subject: (bug 64494) do only retry on 'edit-already-exists' ......................................................................
(bug 64494) do only retry on 'edit-already-exists'
proposed by John Mark Vandenberg, see bug 62126 #3
Change-Id: Ifb4f2fcc1040acb96a902b7b7c174b382a4fa75b --- M pywikibot/data/api.py 1 file changed, 8 insertions(+), 3 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index d5fc032..5d86adb 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -392,11 +392,16 @@ if code.startswith(u'internal_api_error_'): self.wait() continue - # bugs 46535, 62126 + # bugs 46535, 62126, 64494 # maybe removed when it 46535 is solved if code == "failed-save" and action == 'wbeditentity': - self.wait() - continue + try: + message = result["error"]["messages"]["0"]["name"] + except KeyError: + message = None + if message == u'edit-already-exists': + self.wait() + continue # raise error try: pywikibot.log(u"API Error: query=\n%s"
pywikibot-commits@lists.wikimedia.org