tests: Remove check for os.set_inheritable

This is available on all supported Python versions.

Change-Id: I76a696e56e04ec47b107af8e169c04138cf45fbb
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2022-01-27 16:39:06 +00:00
parent eb1fdd8abc
commit d95fd8ac61

@ -269,10 +269,7 @@ def fork_exec(cmd,
os.dup2(fptr.fileno(), desc)
except OSError:
pass
if pass_fds and hasattr(os, 'set_inheritable'):
# os.set_inheritable() is only available and needed
# since Python 3.4. On Python 3.3 and older, file descriptors are
# inheritable by default.
if pass_fds:
for fd in pass_fds:
os.set_inheritable(fd, True)