Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matter update fixes #805

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion matter_server/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,5 @@ def as_dict(self) -> dict:
"min_applicable_software_version": self.min_applicable_software_version,
"max_applicable_software_version": self.max_applicable_software_version,
"release_notes_url": self.release_notes_url,
"update_source": str(self.update_source),
"update_source": self.update_source.value,
}
8 changes: 2 additions & 6 deletions matter_server/server/ota/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import asyncio
from base64 import b64encode
from datetime import UTC, datetime
import functools
import hashlib
import logging
from pathlib import Path
Expand Down Expand Up @@ -78,11 +77,8 @@ def __init__(self, vendor_id: int, ota_provider_dir: Path) -> None:

async def initialize(self) -> None:
"""Initialize OTA Provider."""

loop = asyncio.get_event_loop()

await loop.run_in_executor(
None, functools.partial(self._ota_provider_dir.mkdir, exist_ok=True)
await asyncio.to_thread(
self._ota_provider_dir.mkdir, exist_ok=True, parents=True
)

async def _commission_ota_provider(
Expand Down