Dalba has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/53/404953/1

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

-- 
To view, visit https://gerrit.wikimedia.org/r/404953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bc32d8789916c59ffd6f6446fda605817811f72
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to