Changeset 550


Ignore:
Timestamp:
08/11/11 14:21:20 (9 years ago)
Author:
bas
Message:

fixed an error in check_filename_length must return 'None' if filename is empty. see #247

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r549 r550  
    640640        """
    641641        self.logger.debug('function check_filename_length: ')
     642
     643        if not name:
     644            return 'None'
    642645       
    643646        dummy_filename, ext = os.path.splitext(name)
     
    10451048            if value:
    10461049                user_dict[name] = value
    1047                 if self.parameters.debug:
    1048                     s = 'used %s = %s' %(name, value)
    1049                     self.print_unicode(s)
     1050
     1051                s = 'used %s = %s' %(name, value)
     1052                self.print_unicode(s)
    10501053
    10511054        self.update_ticket_fields(ticket, user_dict, new=1)
     
    20472050            if filename in [ 'None']:
    20482051                filename = 'untitled-part'
    2049                 self.logger.info('Rename filename "None" to: %s' %filename)
     2052                self.logger.info('\t Rename filename "None" to: %s' %filename)
    20502053
    20512054                ## Guess the extension from the content type, use non strict mode
     
    20902093                unique_filename = "%s-%s%s" % (dummy_filename, num, ext)
    20912094               
    2092             s = 'Attachment with filename %s will be saved as %s' % (filename, unique_filename)
     2095            s = '\t Attachment with filename %s will be saved as %s' % (filename, unique_filename)
    20932096            self.print_unicode(s)
    20942097
Note: See TracChangeset for help on using the changeset viewer.