Ignore:
Timestamp:
02/17/06 16:29:38 (18 years ago)
Author:
bas
Message:

EmailtoTracScript?:

delete_spam.py.in:

  • Fixed an exception error when shutil has not enough priveledges to remove the attachments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/delete_spam.py.in

    r22 r55  
    8686                                        if debug:
    8787                                                print 'delete %s : %s' %(spam_id, attachment_dir)
    88                                         shutil.rmtree(attachment_dir)
     88                                        try:
     89                                                shutil.rmtree(attachment_dir)
     90                                        except OSError, detail:
     91                                                print 'Contact system-administrator: %s' %detail
     92                                                continue
    8993
    9094                        cursor.execute("DELETE FROM ticket WHERE  component = 'Spam';")
Note: See TracChangeset for help on using the changeset viewer.