diff roundup/mailgw.py @ 1603:5a2a89a2f4aa maint-0.5

email file attachments added to issue files list [SF#711501]
author Richard Jones <richard@users.sourceforge.net>
date Wed, 23 Apr 2003 12:10:51 +0000
parents 3a853f1c20b5
children 6d1af2e441f4
line wrap: on
line diff
--- a/roundup/mailgw.py	Wed Apr 23 11:48:51 2003 +0000
+++ b/roundup/mailgw.py	Wed Apr 23 12:10:51 2003 +0000
@@ -73,7 +73,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.104.2.1 2003-02-06 05:44:49 richard Exp $
+$Id: mailgw.py,v 1.104.2.2 2003-04-23 12:10:51 richard Exp $
 '''
 
 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
@@ -836,6 +836,17 @@
             files.append(self.db.file.create(type=mime_type, name=name,
                 content=data))
 
+        # attach the files to the issue
+        if nodeid:
+            # extend the existing files list
+            fileprop = cl.get(nodeid, 'file')
+            fileprop.extend(files)
+            props['files'] = fileprop
+        else:
+            # pre-load the files list
+            props['files'] = fileprop
+
+
         # 
         # create the message if there's a message body (content)
         #

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