1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-09 21:24:36 +00:00

[#62 state:fixed] Wrapped winshell exception.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40164
This commit is contained in:
hsoft 2009-10-01 11:13:58 +00:00
parent 354babc417
commit ff86624c3e

View File

@ -8,7 +8,14 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
from __future__ import unicode_literals
import logging
import winshell
def recycle_file(path):
winshell.delete_file(unicode(path), no_confirm=True)
try:
winshell.delete_file(unicode(path), no_confirm=True, silent=True)
except winshell.x_winshell as e:
logging.warning("winshell error: %s", e)