]> code.delx.au - pymsnt/blobdiff - src/tlib/xmlw.py
Suppress SSL warning
[pymsnt] / src / tlib / xmlw.py
index ea96e9b5c033476a820577596df5510ac8ea5f2b..7341636f1c869dd3f3872f423a733dcc045cb80b 100644 (file)
@@ -60,9 +60,12 @@ def parseFile(filename, beExtremelyLenient=False):
        return t.root
 
 
-# Suppress the annoying warning we get with Twisted 1.3
 import warnings, re
-warnings.filters.append(("ignore", None, UserWarning, re.compile("twisted.words.__init__"), 21))
+# Suppress the annoying warning we get with Twisted 1.3 words being deprecated
+warnings.filters.append(("ignore", None, UserWarning, re.compile("twisted.words"), 21))
+# Suppress the OpenSSL UserWarning
+warnings.filters.append(("ignore", re.compile("SSL connection shutdown possibly unreliable, please upgrade to ver 0.XX"), UserWarning, re.compile("twisted.internet.tcp"), 216))
+
 
 try:
        log.msg("Trying to import XML DOM")