Handle os.remove failing on windows

This commit is contained in:
John Garland 2010-06-08 03:19:30 +10:00
parent 0fcd90ee2c
commit f2944bdeef
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,7 @@
=== Deluge 1.3.0-rc2 (In Development) ===
==== Core ====
* Fix tracker_icons failing on windows
==== ConsoleUI ====
* #1307: Fix not being able to add torrents
* #1293: Fix not being able to add paths that contain backslashes

View File

@ -263,7 +263,10 @@ class TrackerIcons(Component):
break
parser.close()
f.close()
os.remove(page)
try:
os.remove(page)
except Exception, e:
log.warning("Couldn't remove temp file: %s", e)
return parser.get_icons()
def on_parse_complete(self, icons, host):