diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-06 09:21:01 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-09-26 18:13:31 -0400 |
| commit | a843a997437286f7ddce4d8fde843fab39888a23 (patch) | |
| tree | 4c2d101275c6449207f620bbe9ec4eb45d839d76 /mesonbuild/scripts | |
| parent | 5b317c5658f5865aea76b5a5afda2cdc8bd50959 (diff) | |
| download | meson-a843a997437286f7ddce4d8fde843fab39888a23.tar.gz | |
mypy: replace fchmod by chmod
The former is unix-only, which complains when running on the Windows
platform -- even though this code is in a unix-specific branch.
But per the docs:
> As of Python 3.3, this is equivalent to os.chmod(fd, mode).
So we can just use the identical function that is available in more
places.
Diffstat (limited to 'mesonbuild/scripts')
| -rw-r--r-- | mesonbuild/scripts/depfixer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py index 593efd9f7..10399332c 100644 --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py @@ -154,7 +154,7 @@ class Elf(DataSizes): def close_bf(self) -> None: if self.bf is not None: if self.bf_perms is not None: - os.fchmod(self.bf.fileno(), self.bf_perms) + os.chmod(self.bf.fileno(), self.bf_perms) self.bf_perms = None self.bf.close() self.bf = None |
