Remove unnecessary file close

This commit is contained in:
Andrea Lanfranchi 2024-02-22 14:43:01 +01:00
parent 1d53ca1bd1
commit 60c23fbc8e
No known key found for this signature in database
GPG Key ID: 2D623A60BB279915

View File

@ -115,12 +115,10 @@ def find(
if not os.path.exists(datastore_path):
with open(datastore_path, "wb") as f:
pickle.dump([], f)
f.close()
# Load the representations from the pickle file
with open(datastore_path, "rb") as f:
representations = pickle.load(f)
f.close()
# Check if the representations are out-of-date
if len(representations) > 0: