Changeset 339


Ignore:
Timestamp:
03/24/10 15:06:51 (14 years ago)
Author:
bas
Message:

email2trac.py.in:

  • removed obsolete function mkdir_p
    • re-arranged code is sections
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r336 r339  
    280280                self.trac_smtp_from = self.get_config('notification', 'smtp_from')
    281281
     282########## Email Header Field Functions ###########################################################
     283
    282284        def spam(self, message):
    283285                """
     
    496498                                ticket['cc'] = self.email_to_unicode(email_cc)
    497499
     500
     501########## DEBUG functions  ###########################################################
     502
    498503        def debug_body(self, message_body, tempfile=False):
    499504                if tempfile:
     
    590595                self.debug_attachments(message_parts)
    591596
     597########## Conversion functions  ###########################################################
     598
    592599        def str_to_dict(self, s):
    593600                """
     
    614621                                pass
    615622                return result
     623
     624########## TRAC ticket functions  ###########################################################
    616625
    617626        def update_ticket_fields(self, ticket, user_dict, use_default=None):
     
    969978
    970979
     980########## Fullblog functions  ###########################################################
     981
    971982        def blog(self, id):
    972983                """
     
    14001411                        dummy_filename, ext = os.path.splitext(filename)
    14011412
    1402                         while unique_filename in attachment_names or self.attachment_exists(unique_filename):
     1413                        while (unique_filename in attachment_names) or self.attachment_exists(unique_filename):
    14031414                                num += 1
    14041415                                unique_filename = "%s-%s%s" % (dummy_filename, num, ext)
     
    15941605                return status
    15951606
    1596 
    1597 def mkdir_p(dir, mode):
    1598         '''do a mkdir -p'''
    1599 
    1600         arr = string.split(dir, '/')
    1601         path = ''
    1602         for part in arr:
    1603                 path = '%s/%s' % (path, part)
    1604                 try:
    1605                         stats = os.stat(path)
    1606                 except OSError:
    1607                         os.mkdir(path, mode)
    16081607
    16091608def ReadConfig(file, name):
Note: See TracChangeset for help on using the changeset viewer.