diff --git a/TODO.md b/TODO.md index baaeb68a..c8dd3d2d 100644 --- a/TODO.md +++ b/TODO.md @@ -13,6 +13,7 @@ - Refactoring - Use .mjs modules + - SignIn/RememberAccount screens - Don't bake in size properties for components - Unfinished work in button-refactor branch - Button can get "hoverEnabled: false" to let HoverHandlers work diff --git a/src/python/image_provider.py b/src/python/image_provider.py index b15fb099..59a89134 100644 --- a/src/python/image_provider.py +++ b/src/python/image_provider.py @@ -9,7 +9,7 @@ from pathlib import Path from typing import Tuple from urllib.parse import urlparse -from atomicfile import AtomicFile +import aiofiles from dataclasses import dataclass, field from PIL import Image as PILImage @@ -108,8 +108,8 @@ class Thumbnail: self.local_path.parent.mkdir(parents=True, exist_ok=True) - with AtomicFile(str(self.local_path), "wb") as file: - file.write(body) + async with aiofiles.open(self.local_path, "wb") as file: + await file.write(body) return body