Changeset 339
- Timestamp:
- 03/24/10 15:06:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/email2trac.py.in
r336 r339 280 280 self.trac_smtp_from = self.get_config('notification', 'smtp_from') 281 281 282 ########## Email Header Field Functions ########################################################### 283 282 284 def spam(self, message): 283 285 """ … … 496 498 ticket['cc'] = self.email_to_unicode(email_cc) 497 499 500 501 ########## DEBUG functions ########################################################### 502 498 503 def debug_body(self, message_body, tempfile=False): 499 504 if tempfile: … … 590 595 self.debug_attachments(message_parts) 591 596 597 ########## Conversion functions ########################################################### 598 592 599 def str_to_dict(self, s): 593 600 """ … … 614 621 pass 615 622 return result 623 624 ########## TRAC ticket functions ########################################################### 616 625 617 626 def update_ticket_fields(self, ticket, user_dict, use_default=None): … … 969 978 970 979 980 ########## Fullblog functions ########################################################### 981 971 982 def blog(self, id): 972 983 """ … … 1400 1411 dummy_filename, ext = os.path.splitext(filename) 1401 1412 1402 while unique_filename in attachment_namesor self.attachment_exists(unique_filename):1413 while (unique_filename in attachment_names) or self.attachment_exists(unique_filename): 1403 1414 num += 1 1404 1415 unique_filename = "%s-%s%s" % (dummy_filename, num, ext) … … 1594 1605 return status 1595 1606 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)1608 1607 1609 1608 def ReadConfig(file, name):
Note: See TracChangeset
for help on using the changeset viewer.