Page MenuHomePhabricator

CCC: Add catch for LockedPage to all retry_apierror() save edit calls
Closed, ResolvedPublic

Description

All retry_apierror() edit calls should catch pywikibot.exceptions.LockedPage.

  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 133, in wrapper
    handle(func, self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 124, in handle
    raise err
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 112, in handle
    func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/page.py", line 1303, in _save
    done = self.site.editpage(self, summary=summary, minor=minor,
  File "/usr/local/lib/python3.8/site-packages/pywikibot/site.py", line 1319, in callee
    return fn(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pywikibot/site.py", line 5371, in editpage
    raise self._ep_errors[err.code](page)
pywikibot.exceptions.LockedPage: Page [[commons:User talk:TheSandBot/ccc tests]] is locked.
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.LockedPage'>

Revisions and Commits

Event Timeline

TheSandDoctor created this task.
TheSandDoctor created this object with visibility "Public (No Login Required)".
TheSandDoctor closed this task as Resolved by committing Restricted Diffusion Commit.Feb 6 2020, 9:13 PM
TheSandDoctor added a commit: Restricted Diffusion Commit.
TheSandDoctor added a commit: Restricted Diffusion Commit.Feb 6 2020, 9:20 PM
TheSandDoctor added a commit: Restricted Diffusion Commit.Feb 6 2020, 9:23 PM