jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1221234?usp=email )
Change subject: cleanup: Remove Python 2.4 code ...................................................................... cleanup: Remove Python 2.4 code Remove suppressing AssertionError in async_manager function which was introduced in Pywikibot 1.0 for older Python versions: https://static-codereview.wikimedia.org/pywikipedia/4131.html AssertionError was replaced by RuntimeError in Python 2.5: https://docs.python.org/2.6/library/threading.html Bug: T154771 Change-Id: I25772220e441609ec4bfb619247ee243c57e1b4e --- M pywikibot/__init__.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 5d72ae0..7dc246a 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -405,7 +405,8 @@ def async_request(request: Callable, *args: Any, **kwargs: Any) -> None: """Put a request on the queue, and start the daemon if necessary.""" if not _putthread.is_alive(): - with page_put_queue.mutex, suppress(AssertionError, RuntimeError): + # ignore RuntimeError if start() is called more than once + with page_put_queue.mutex, suppress(RuntimeError): _putthread.start() page_put_queue.put((request, args, kwargs)) -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1221234?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I25772220e441609ec4bfb619247ee243c57e1b4e Gerrit-Change-Number: 1221234 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <[email protected]> Gerrit-Reviewer: Xqt <[email protected]> Gerrit-Reviewer: jenkins-bot
_______________________________________________ Pywikibot-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
