Skip to content

Commit

Permalink
Matter update fixes (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Jul 16, 2024
1 parent 8776a4d commit 43375dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion matter_server/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,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

0 comments on commit 43375dc

Please sign in to comment.