Changeset 73 for emailtotracscript/trunk/email2trac.py.in
- Timestamp:
- 05/22/06 12:46:09 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/email2trac.py.in
r72 r73 563 563 564 564 # Insert the attachment it differs for the different TRAC versions 565 # 565 # 566 566 if self.VERSION == 0.8: 567 567 cursor = self.db.cursor() 568 cursor.execute('INSERT INTO attachment VALUES("%s","%s","%s",%d,%d,"%s","%s","%s")' 569 %('ticket', urllib.quote(str(ticket['id'])), filename + '?format=raw', filesize, 570 int(time.time()),'', self.author, 'e-mail') ) 568 try: 569 cursor.execute('INSERT INTO attachment VALUES("%s","%s","%s",%d,%d,"%s","%s","%s")' 570 %('ticket', urllib.quote(str(ticket['id'])), filename + '?format=raw', filesize, 571 int(time.time()),'', self.author, 'e-mail') ) 572 573 # Attachment is already known 574 # 575 except sqlite.IntegrityError: 576 self.db.close() 577 return 578 571 579 self.db.commit() 580 572 581 else: 573 582 fd = open(path) … … 673 682 from trac.Href import Href 674 683 from trac import util 684 import sqlite 675 685 elif version == 0.9: 676 686 from trac import attachment
Note: See TracChangeset
for help on using the changeset viewer.