diff options
author | mrbean-bremen <hansemrbean@googlemail.com> | 2022-08-27 21:04:19 +0200 |
---|---|---|
committer | mrbean-bremen <hansemrbean@googlemail.com> | 2022-08-27 21:04:19 +0200 |
commit | 34106ecb6b5b083509a81057fddf616bf0a74822 (patch) | |
tree | 10ec27e8d22cff7e153deb7673beb27dacd5dcfa /pyfakefs | |
parent | f0acbb6993a831faeeec4c88a66bde17f3df95ba (diff) | |
download | pyfakefs-34106ecb6b5b083509a81057fddf616bf0a74822.tar.gz |
Return the expected type from fcntl.ioctl and fcntl.fcntl
- if 'arg' is of type byte, the return value should also be 'byte'
- the actual command is ignored as before
Diffstat (limited to 'pyfakefs')
-rw-r--r-- | pyfakefs/fake_filesystem.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyfakefs/fake_filesystem.py b/pyfakefs/fake_filesystem.py index bf5c960..dfa475e 100644 --- a/pyfakefs/fake_filesystem.py +++ b/pyfakefs/fake_filesystem.py @@ -5085,11 +5085,11 @@ if sys.platform != 'win32': self._fcntl_module = fcntl def fcntl(self, fd: int, cmd: int, arg: int = 0) -> Union[int, bytes]: - return 0 + return 0 if isinstance(arg, int) else arg def ioctl(self, fd: int, request: int, arg: int = 0, mutate_flag: bool = True) -> Union[int, bytes]: - return 0 + return 0 if isinstance(arg, int) else arg def flock(self, fd: int, operation: int) -> None: pass |