Skip to content

Avoid os.chmod failing on Windows if file non-existant#471

Merged
ikalchev merged 2 commits intoikalchev:devfrom
pjkundert:fix-chmod-windows
Nov 3, 2024
Merged

Avoid os.chmod failing on Windows if file non-existant#471
ikalchev merged 2 commits intoikalchev:devfrom
pjkundert:fix-chmod-windows

Conversation

@pjkundert
Copy link
Copy Markdown
Contributor

On Windows, os.chmod fails if the target file doesn't exist. Avoid calling it in that case.

Comment thread pyhap/accessory_driver.py Outdated
Comment thread pyhap/accessory_driver.py Outdated
@ikalchev ikalchev merged commit 1042ae5 into ikalchev:dev Nov 3, 2024
ikalchev added a commit that referenced this pull request Nov 3, 2024
* Late-import base36 and QR code libraries; remove SUPPORT_QR_CODE flag

* Increase idle connection check interval to 300s (#475)

This check was creating a lot of TimerHandles when the user
had multiple bridges. We do not need to check very often
as connections usually stay around for 24+hours

* Implement zerocopy writes for the encrypted protocol (#476)

* Implement zerocopy writes for the encrypted protocol

With Python 3.12+ and later `transport.writelines` is implemented as [`sendmsg(..., IOV_MAX)`](python/cpython#91166) which allows us to avoid joining the bytes and sending them in one go.

Older Python will effectively do the same thing we do now `b"".join(...)`

* update tests

* Revert "Late-import base36 and QR code libraries; remove SUPPORT_QR_CODE flag" (#477)

* Avoid os.chmod failing on Windows if file non-existant (#471)

* Avoid os.chmod failing on Windows if file non-existant

* Update accessory_driver.py

---------

Co-authored-by: Ivan Kalchev <25887324+ikalchev@users.noreply.github.com>

* Fix mdns tests (#478)

* Fix pylint complaints (#480)

* Address remaining pylint complaints (#481)

* Address remaining pylint complaints

* Address remaining pylint complaints

* v4.9.2

---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Perry Kundert <perry@kundert.ca>
Co-authored-by: Ivan Kalchev <ii.kalchev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants