Core: Protect from clearing a non-existant cache

Issue kindly raised by @garanews, thanks!  5:D
This commit is contained in:
Mike Auty
2023-05-22 15:05:43 +01:00
parent 8e56cb39d1
commit b9e5cfb393
+4 -1
View File
@@ -224,4 +224,7 @@ def list_plugins() -> Dict[str, Type[interfaces.plugins.PluginInterface]]:
def clear_cache(complete=False):
os.unlink(os.path.join(constants.CACHE_PATH, constants.IDENTIFIERS_FILENAME))
try:
os.unlink(os.path.join(constants.CACHE_PATH, constants.IDENTIFIERS_FILENAME))
except FileNotFoundError:
vollog.log(constants.LOGLEVEL_VVVV, "Attempting to clear a non-existant cache")