Modify

Opened 13 years ago

Closed 13 years ago

#230 closed defect (fixed)

HTML-parts are attached as `None` instead of `untiteled-part.ext`

Reported by: hju@… Owned by: bas
Priority: major Milestone: release 2.0.0
Component: email2trac Version:
Keywords: Cc:

Description

Since upgrade to email2trac 1.2.0 and trac 0.11.6 in 03/2010 (currently running email2trac 1.4.6), inline-parts of html-mails (like images/jpg or text/html) are attached as None. Anyway, images are included and shown "inline" in the Ticket-description as expected.

Obviously, part.get_filename() in def get_message_parts() returns 'None' instead of ''. So the code:

  if not filename:
    filename = 'untitled-part'

    # Guess the extension from the content type, use non strict mode
    # some additional non-standard but commonly used MIME types 
    # are also recognized
    #
    ext = mimetypes.guess_extension(part.get_content_type(), False)
    if not ext:
      ext = '.bin'

    filename = '%s%s' % (filename, ext)

in def unique_attachment_names() has no longer effekt at all.

As I couldn't find get_filename(), I can't trace down to the source of the problem. Is it email2trac or perhaps an issue of our trac-update?

Sorry for reporting so late, but I have not investigatet this any further...

Attachments (0)

Change History (2)

comment:1 Changed 13 years ago by bas

  • Milestone set to release 1.7.0
  • Status changed from new to assigned

Thanks for the rpeort. I will try yo fix it

comment:2 Changed 13 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [495]) Attachments without a name will be saved a 'untitled-part'. This used to be so, closes #230

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.