Handle os.remove failing on windows

This commit is contained in:
John Garland 2010-06-08 03:19:30 +10:00
parent 94f96c5165
commit d800273891
1 changed files with 4 additions and 1 deletions

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):