Changeset 92


Ignore:
Timestamp:
07/06/06 12:13:43 (16 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac.py.in:

  • Fixed some bugs
  • Preparing for new release
Location:
emailtotracscript/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/ChangeLog

    r91 r92  
    1 2006-
     12006-07-06
    22        - Fixed an error in already added attachments. Do not close
    33          the database connection.
     
    2929        - Fixed an encoding problem when email_header is set to 1
    3030          Fixed by: Bas van der Vlies
     31
     32        - Fixed a bug in to_unicode() function.
     33          Fixed by: Bas van der Vlies
     34
     35        - Fixed an unicodedata.normalize TypeError bug for filenames in the
     36          attachment function
     37          Fixed by: Bas van der Vlies
     38
    3139
    32402006-06-02
  • emailtotracscript/trunk/INSTALL

    r87 r92  
    2222 email_header: 1            # OPTIONAL, if set then show TO/CC fields in description
    2323 trac_version: 0.8          # OPTIONAL, if set use this as trac version (D: 0.9)
    24  enable_syslog: 1           # OPTIONAL, if set log errors to syslog
     24 enable_syslog: 1           # OPTIONAL, if set log errors to syslog, note errors are not
     25                                        mailed back to the reporter.
    2526
    2627 [bas]                     # OPTIONAL project declaration, also set
  • emailtotracscript/trunk/debian/changelog

    r91 r92  
     1email2trac (0.7.3-7) stable; urgency=low
     2
     3  * removed some unicode data conversions
     4
     5 -- root <root@subtrac.sara.nl>  Thu,  6 Jul 2006 09:04:35 +0200
     6
    17email2trac (0.7.3-6) stable; urgency=low
    28
  • emailtotracscript/trunk/email2trac.conf

    r87 r92  
    66reply_address: 1
    77reply_all : 1
    8 mailto_link: 1
     8mailto_link: 0
    99umask: 022
    1010email_comment: >
    11 email_header: 1
     11email_header: 0
    1212trac_version: 0.9
    1313enable_syslog : 0
  • emailtotracscript/trunk/email2trac.py.in

    r91 r92  
    198198                        else:
    199199                                temp = string.strip(text)
     200                                temp = unicode(text, 'iso-8859-15')
    200201
    201202                        if str:
     
    408409                if self.EMAIL_HEADER > 0:
    409410                        head = self.email_header_txt(msg)
    410 
     411                       
    411412
    412413                body_text = self.get_body_text(msg)
     
    416417                # field of a ticket
    417418                #
    418                 tkt['description'] = u'email2trac:%s\r\n{{{\r\n%s\r\n}}}' \
     419                tkt['description'] = 'email2trac:%s\r\n{{{\r\n%s\r\n}}}' \
    419420                        %(head, body_text)
    420421
     
    432433                if self.MAILTO:
    433434                        mailto = self.html_mailto_link(self.to_unicode(msg['subject']), ticket_id, body_text)
    434                         tkt['description'] = u'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text)
     435                        tkt['description'] = 'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text)
    435436                        comment = '\nadded mailto line\n'
    436437                        changed = True
     
    608609                        # We try to normalize the filename to utf-8 NFC if we can.
    609610                        # Files uploaded from OS X might be in NFD.
     611                        # Check python version and then try it
    610612                        #
    611613                        if sys.version_info[0] > 2 or (sys.version_info[0] == 2 and sys.version_info[1] >= 3):
    612                                 filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8') 
     614                                try:
     615                                        filename = unicodedata.normalize('NFC', unicode(filename, 'utf-8')).encode('utf-8') 
     616                                except TypeError:
     617                                        pass
    613618
    614619                        url_filename = urllib.quote(filename)
Note: See TracChangeset for help on using the changeset viewer.