diff --git a/src/calibre/db/backend.py b/src/calibre/db/backend.py index 47e4c90c76..0cd0833c69 100644 --- a/src/calibre/db/backend.py +++ b/src/calibre/db/backend.py @@ -1111,7 +1111,9 @@ class DB(object): if self.is_deletable(path): try: shutil.rmtree(path) - except: + except EnvironmentError as e: + if e.errno == errno.ENOENT and not os.path.exists(path): + return import traceback traceback.print_exc() time.sleep(1) # In case something has temporarily locked a file