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'>