Don't raise an exception when failing to delete the redirect log

This commit is contained in:
Kovid Goyal 2009-07-19 14:16:55 -06:00
parent 8ed1f50979
commit 6eb3ad28f7

View File

@ -116,7 +116,10 @@ class ReadMetadata(Thread):
if job.failed: if job.failed:
prints(job.details) prints(job.details)
if os.path.exists(job.log_path): if os.path.exists(job.log_path):
os.remove(job.log_path) try:
os.remove(job.log_path)
except:
pass
def read_metadata(paths, result_queue, chunk=50, spare_server=None): def read_metadata(paths, result_queue, chunk=50, spare_server=None):
@ -191,7 +194,10 @@ class SaveWorker(Thread):
prints(job.details) prints(job.details)
self.error = job.details self.error = job.details
if os.path.exists(job.log_path): if os.path.exists(job.log_path):
os.remove(job.log_path) try:
os.remove(job.log_path)
except:
pass
def save_book(task, library_path, path, single_dir, single_format, def save_book(task, library_path, path, single_dir, single_format,