jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404953 )
Change subject: utils.py: Ignore unclosed SSLSocket ResourceWarning ......................................................................
utils.py: Ignore unclosed SSLSocket ResourceWarning
Bug: T185188 Change-Id: I8bc32d8789916c59ffd6f6446fda605817811f72 --- M tests/utils.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/tests/utils.py b/tests/utils.py index dde0993..eaf68c4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -259,7 +259,8 @@ # Ignore socket IO warnings (T183696, T184996) if (PYTHON_VERSION >= (3, 2) and issubclass(warn_msg.category, ResourceWarning) - and 'unclosed <socket.socket' in str(warn_msg.message) + and any(str(warn_msg.message).startswith(msg) for msg in ( + 'unclosed <ssl.SSLSocket', 'unclosed <socket.socket')) and warn_msg.filename.rpartition('/')[2] in ( 'cookiejar.py', 'inspect.py', 'socket.py')): return
pywikibot-commits@lists.wikimedia.org