mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Retry deleting since on windows something could have locked a file
This commit is contained in:
parent
4e54cd601a
commit
7dbdfd565d
@ -42,7 +42,11 @@ class FTSAPITest(BaseTest):
|
|||||||
|
|
||||||
def new_library(self):
|
def new_library(self):
|
||||||
if os.path.exists(self.library_path):
|
if os.path.exists(self.library_path):
|
||||||
shutil.rmtree(self.library_path)
|
try:
|
||||||
|
shutil.rmtree(self.library_path)
|
||||||
|
except PermissionError:
|
||||||
|
time.sleep(5)
|
||||||
|
shutil.rmtree(self.library_path)
|
||||||
os.makedirs(self.library_path)
|
os.makedirs(self.library_path)
|
||||||
self.create_db(self.library_path)
|
self.create_db(self.library_path)
|
||||||
ans = self.init_cache()
|
ans = self.init_cache()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user