Changeset 620


Ignore:
Timestamp:
03/18/13 10:56:42 (11 years ago)
Author:
bas
Message:

fixed a UnicodeDecode? Error in printing filename
added pseudo code for pip and virtual env

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r618 r620  
    22  * use self.env.get_read_db for trac version > 0.11. self.env.get_db_cnx is obsolete. TRAC
    33    api documentation.
     4    Fixed by: Bas van der Vlies
     5
     6  * fixed an UnicodeDecodeError when checking attachments filenames.
    47    Fixed by: Bas van der Vlies
    58
  • trunk/email2trac.py.in

    r618 r620  
    4747        $Id$
    4848"""
     49
     50### virualenv
     51##
     52#        if virtualenv and os.path.exists(virtualenv):
     53#                activate_this = os.path.join(virtualenv,
     54#'bin/activate_this.py')
     55#               if os.path.exists(activate_this):
     56#                        execfile(activate_this,
     57
    4958import os
    5059import sys
     
    715724        ## Trac uses this format
    716725        #
    717         quote_format = util.text.unicode_quote(dummy_filename)
     726        try:
     727            quote_format = util.text.unicode_quote(dummy_filename)
     728
     729        except UnicodeDecodeError, detail:
     730            ## last resort convert to unicode
     731            #
     732            dummy_filename = util.text.to_unicode(dummy_filename)
     733            quote_format = util.text.unicode_quote(dummy_filename)
    718734
    719735        ## Determine max filename lenght
Note: See TracChangeset for help on using the changeset viewer.