Changeset 242 for trunk/email2trac.py.in


Ignore:
Timestamp:
01/16/09 14:48:48 (15 years ago)
Author:
bas
Message:

email2trac.py.in:

  • closes #93, 110 problems with window attachements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r241 r242  
    11201120                                filename = 'untitled-part'
    11211121
    1122                                 # Guess the extension from the content type
    1123                                 ext = mimetypes.guess_extension(part.get_content_type())
     1122                                # Guess the extension from the content type, use non strict mode
     1123                                # some additional non-standard but commonly used MIME types
     1124                                # are also recognized
     1125                                #
     1126                                ext = mimetypes.guess_extension(part.get_content_type(), False)
    11241127                                if not ext:
    11251128                                        ext = '.bin'
     
    13081311                        # Insert the attachment
    13091312                        #
    1310                         fd = open(path)
     1313                        fd = open(path, 'rb')
    13111314                        att = attachment.Attachment(self.env, 'ticket', ticket['id'])
    13121315
Note: See TracChangeset for help on using the changeset viewer.