From f579d5c290b80e00974e8c034f9d6dd697fcdfa6 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 30 Nov 2008 20:30:43 -0800 Subject: Now that Python 2.4 is the minimum and we will use more recent installed email packages, convert all the email message get_type() calls to get_content_type(). --- Mailman/Bouncers/Postfix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Mailman/Bouncers/Postfix.py') diff --git a/Mailman/Bouncers/Postfix.py b/Mailman/Bouncers/Postfix.py index 1fab8666..3c250e95 100644 --- a/Mailman/Bouncers/Postfix.py +++ b/Mailman/Bouncers/Postfix.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -71,14 +71,14 @@ def findaddr(msg): def process(msg): - if msg.get_type() not in ('multipart/mixed', 'multipart/report'): + if msg.get_content_type() not in ('multipart/mixed', 'multipart/report'): return None # We're looking for the plain/text subpart with a Content-Description: of # `notification'. leaves = [] flatten(msg, leaves) for subpart in leaves: - if subpart.get_type() == 'text/plain' and \ + if subpart.get_content_type() == 'text/plain' and \ subpart.get('content-description', '').lower() == 'notification': # then... return findaddr(subpart) -- cgit v1.2.3