Mercurial > p > roundup > code
diff roundup/mailgw.py @ 1604:f2bdf6b07c2a
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 | 4074e2336eed |
| children | e109d59f232d |
line wrap: on
line diff
--- a/roundup/mailgw.py Wed Apr 23 11:59:36 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.116 2003-04-17 06:51:44 richard Exp $ +$Id: mailgw.py,v 1.117 2003-04-23 12:09:20 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -817,6 +817,16 @@ name = "unnamed" files.append(self.db.file.create(type=mime_type, name=name, content=data, **file_props)) + # 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)
