Changeset 99 for emailtotracscript
- Timestamp:
- 07/13/06 14:39:25 (18 years ago)
- Location:
- emailtotracscript/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/ChangeLog
r98 r99 12 12 Fixed by: Bas van der Vlies 13 13 14 * delete_spam.py 15 - did not clean up the attachment table. So we got nasty new 16 mails with fake attachments. 17 - It works now for versions higher then 0.8 18 14 19 2006-07-06 15 20 * Fixed an error in already added attachments. Do not close -
emailtotracscript/trunk/debian/changelog
r98 r99 1 email2trac (0.7.6-2) stable; urgency=low 2 3 * Fixed delete_spam.py for versions higher then 0.8 4 5 -- Bas van der Vlies <basv@sara.nl> Thu, 13 Jul 2006 14:28:55 +0200 6 7 email2trac (0.7.6-1) stable; urgency=low 8 9 * Fixes delete_spam.py also delete from attachment table 10 Fixes: Jaap Dijkshoorn 11 12 -- root <root@rc.sara.nl> Thu, 13 Jul 2006 12:33:41 +0200 13 1 14 email2trac (0.7.5-1) stable; urgency=low 2 15 -
emailtotracscript/trunk/delete_spam.py.in
r69 r99 79 79 env = Environment(project, create=0) 80 80 db = env.get_db_cnx() 81 81 82 attachment_dir = os.path.join(env.path, 'attachments', 'ticket') 83 82 84 cursor = db.cursor() 83 85 … … 90 92 break 91 93 spam_id = row[0] 92 attachment_dir = os.path.join(env.get_attachments_dir(), 'ticket', str(spam_id)) 93 if os.path.exists(attachment_dir): 94 95 sql_cmd = "DELETE FROM attachment WHERE type='ticket' and id='%s';" %spam_id 96 cursor.execute(sql_cmd) 97 98 dir = os.path.join(attachment_dir, str(spam_id)) 99 if os.path.exists(dir): 94 100 if debug: 95 print 'delete %s : %s' %(spam_id, attachment_dir)101 print 'delete %s : %s' %(spam_id, dir) 96 102 try: 97 shutil.rmtree( attachment_dir)103 shutil.rmtree(dir) 98 104 except OSError, detail: 99 105 print 'Contact system-administrator: %s' %detail
Note: See TracChangeset
for help on using the changeset viewer.