From 6a3cc408130bac5e30076c633cd50f8b3352bdcb Mon Sep 17 00:00:00 2001 From: datawhores Date: Tue, 5 Sep 2023 11:43:17 -0500 Subject: [PATCH] catch permission error --- ofscraper/utils/paths.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofscraper/utils/paths.py b/ofscraper/utils/paths.py index 6772cb7e8..1bd07fbb7 100644 --- a/ofscraper/utils/paths.py +++ b/ofscraper/utils/paths.py @@ -248,7 +248,10 @@ def getDB(): return get_profile_path()/"db.lock" def cleanDB(): - pathlib.Path(get_profile_path()/"db.lock").unlink(missing_ok=True) + try: + pathlib.Path(get_profile_path()/"db.lock").unlink(missing_ok=True) + except PermissionError: + None def speed_file():