Apply 78_DeprecationWarning.patch
authorMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:33:02 +0000 (20:33 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:33:02 +0000 (20:33 -0400)
Mailman/Handlers/Scrubber.py

index 7f5e74a..504be19 100644 (file)
@@ -26,6 +26,7 @@ import time
 import errno
 import binascii
 import tempfile
+import warnings
 from cStringIO import StringIO
 from types import IntType, StringType
 
@@ -77,6 +78,10 @@ except ImportError:
             check(mimetypes.common_types)
         return all
 
+# FIXME: Remove for Mailman 2.2 (which will drop support for Python 2.1)
+# and then actually replace part.get_type(part.get_default_type())
+# with part.get_content_type()
+warnings.filterwarnings("ignore","^get_type\(\) deprecated;",DeprecationWarning,"Mailman")
 
 \f
 def guess_extension(ctype, ext):