Skip to content

Commit

Permalink
Update accessory_driver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikalchev authored Nov 3, 2024
1 parent aa27eb4 commit fadfc46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyhap/accessory_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,12 @@ def persist(self):
tmp_filename = None
try:
temp_dir = os.path.dirname(self.persist_file)
logger.debug(f"Creating temp persist file in {temp_dir!r}")
logger.debug("Creating temp persist file in '%s'", temp_dir)
with tempfile.NamedTemporaryFile(
mode="w", dir=temp_dir, delete=False
) as file_handle:
tmp_filename = file_handle.name
logger.debug(f"Created temp persist file {file_handle!r} named {tmp_filename!r}")
logger.debug("Created temp persist file '%s' named '%s'", file_handle, tmp_filename)
self.encoder.persist(file_handle, self.state)
if (
os.name == "nt"
Expand Down

0 comments on commit fadfc46

Please sign in to comment.