jenkins-bot has submitted this change and it was merged.
Change subject: Retry after OAuth "Nonce already used" error ......................................................................
Retry after OAuth "Nonce already used" error
Bug: T109173 Change-Id: Idebdcc4891fb6ed629ec24221eeaa7b4ee8eb84f --- M pywikibot/data/api.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 40999c6..62ec818 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2165,6 +2165,11 @@ ', '.join('{0}: {1}'.format(*e) for e in user_tokens.items()))) if 'mwoauth-invalid-authorization' in code: + if 'Nonce already used' in info: + pywikibot.error( + 'Retrying failed OAuth authentication for {0}: {1}' + .format(self.site, info)) + continue raise NoUsername('Failed OAuth authentication for %s: %s' % (self.site, info)) # raise error
pywikibot-commits@lists.wikimedia.org