[Mailman-Developers] bug in Handlers/Tagger.py

Tokio Kikuchi tkikuchi@is.kochi-u.ac.jp
Sat, 06 Oct 2001 12:35:17 +0900


Hi,

There were small typos in Tagger.py and here is the patch.

Tokio


-------- Original Message --------
Date: Sat, 6 Oct 2001 12:25:16 +0900 (JST)
From: Mailman Admin <mailman@seppyo.org>
To: tkikuchi@is.kochi-u.ac.jp

--- /home/mailman/src/mailman/Mailman/Handlers/Tagger.py	Fri Oct  5 16:19:30 2001
+++ Mailman/Handlers/Tagger.py	Sat Oct  6 12:19:39 2001
@@ -67,11 +67,11 @@
     # or if the outer type is multipart/alternative and there is a text/plain
     # part.  Anything else, and the body is ignored for header-scan purposes.
     found = None
-    if msg.gettype('text/plain') == 'text/plain':
+    if msg.get_type('text/plain') == 'text/plain':
         found = msg
-    elif msg.ismultipart() and msg.gettype() == 'multipart/alternative':
+    elif msg.ismultipart() and msg.get_type() == 'multipart/alternative':
         for found in msg.get_payload():
-            if found.gettype('text/plain') == 'text/plain':
+            if found.get_type('text/plain') == 'text/plain':
                 break
         else:
             found = None
@@ -99,4 +99,4 @@
     # Concatenate those body text lines with newlines, and then create a new
     # message object from those lines.
     msg = email.message_from_string(NL.join(lines))
-    return msg.getall('subject', []) + msg.getall('keywords', [])
+    return msg.get_all('subject', []) + msg.get_all('keywords', [])