gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049)

This commit is contained in:
Serhiy Storchaka 2023-12-14 13:28:37 +02:00 • committed by GitHub
parent c6e953be12
commit 29f7eb4859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 28 deletions

View file

@ -3737,7 +3737,7 @@ class bool_converter(CConverter):
self.format_unit = 'i'
elif accept != {object}:
fail(f"bool_converter: illegal 'accept' argument {accept!r}")
if self.default is not unspecified:
if self.default is not unspecified and self.default is not unknown:
self.default = bool(self.default)
self.c_default = str(int(self.default))