Skip to content

Commit 0126622

Browse files
author
Engelbert Gruber
committed
if the attachment has no name, name it unnamed, happens with tnefs.
1 parent a1f17d8 commit 0126622

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roundup/mailgw.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.53 2002-01-16 07:20:54 richard Exp $
76+
$Id: mailgw.py,v 1.54 2002-01-16 09:14:45 grubert Exp $
7777
'''
7878

7979

@@ -538,6 +538,8 @@ def handle_message(self, message):
538538
#
539539
files = []
540540
for (name, mime_type, data) in attachments:
541+
if not name:
542+
name = "unnamed"
541543
files.append(self.db.file.create(type=mime_type, name=name,
542544
content=data))
543545

@@ -747,6 +749,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
747749

748750
#
749751
# $Log: not supported by cvs2svn $
752+
# Revision 1.53 2002/01/16 07:20:54 richard
753+
# simple help command for mailgw
754+
#
750755
# Revision 1.52 2002/01/15 00:12:40 richard
751756
# #503340 ] creating issue with [asignedto=p.ohly]
752757
#

0 commit comments

Comments
 (0)