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,6 +42,10 @@ class FTSAPITest(BaseTest):
|
||||
|
||||
def new_library(self):
|
||||
if os.path.exists(self.library_path):
|
||||
try:
|
||||
shutil.rmtree(self.library_path)
|
||||
except PermissionError:
|
||||
time.sleep(5)
|
||||
shutil.rmtree(self.library_path)
|
||||
os.makedirs(self.library_path)
|
||||
self.create_db(self.library_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user