Skip to content

Commit 8e8225f

Browse files
committed
Update cleanup of the file
1 parent 0e5eea4 commit 8e8225f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/apify/storage_clients/_file_system/_key_value_store_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def _process_input_json(self, path: Path) -> None:
5151
try:
5252
f = await asyncio.to_thread(path.open)
5353
input_data = json.load(f)
54-
await self.set_value(key=path.stem, value=input_data)
55-
await asyncio.to_thread(path.unlink, missing_ok=True)
5654
finally:
57-
await asyncio.to_thread(f.close)
55+
f.close()
56+
await asyncio.to_thread(path.unlink, missing_ok=True)
57+
await self.set_value(key=path.stem, value=input_data)

0 commit comments

Comments
 (0)