diff roundup/mailgw.py @ 299:fd9835c1e58d

Did a fair bit of work on the admin tool. Now has an extra command "table" which displays node information in a tabular format. Also fixed import and export so they work. Removed freshen. Fixed quopri usage in mailgw from bug reports.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 17 Oct 2001 23:13:19 +0000
parents ee2f4cb160bd
children f193e0a1b9a5
line wrap: on
line diff
--- a/roundup/mailgw.py	Wed Oct 17 06:57:29 2001 +0000
+++ b/roundup/mailgw.py	Wed Oct 17 23:13:19 2001 +0000
@@ -72,7 +72,7 @@
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception. 
 
-$Id: mailgw.py,v 1.19 2001-10-11 23:43:04 richard Exp $
+$Id: mailgw.py,v 1.20 2001-10-17 23:13:19 richard Exp $
 '''
 
 
@@ -290,14 +290,16 @@
                     # try name on Content-Type
                     name = part.getparam('name')
                     # this is just an attachment
-                    data = part.fp.read()
                     encoding = part.getencoding()
                     if encoding == 'base64':
-                        data = binascii.a2b_base64(data)
+                        data = binascii.a2b_base64(part.fp.read())
                     elif encoding == 'quoted-printable':
-                        data = quopri.decode(data)
+                        # the quopri module wants to work with files
+                        decoded = cStringIO.StringIO()
+                        quopri.decode(part.fp, decoded)
+                        data = decoded.getvalue()
                     elif encoding == 'uuencoded':
-                        data = binascii.a2b_uu(data)
+                        data = binascii.a2b_uu(part.fp.read())
                     attachments.append((name, part.gettype(), data))
 
             if content is None:
@@ -416,6 +418,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.19  2001/10/11 23:43:04  richard
+# Implemented the comma-separated printing option in the admin tool.
+# Fixed a typo (more of a vim-o actually :) in mailgw.
+#
 # Revision 1.18  2001/10/11 06:38:57  richard
 # Initial cut at trying to handle people responding to CC'ed messages that
 # create an issue.

Roundup Issue Tracker: http://roundup-tracker.org/