# Buggy code
def select(self, timeout=None):
    # Selecting on empty lists on Windows errors out.
    if not len(self._readers) and not len(self._writers):
        return []

    timeout = None if timeout is None else max(timeout, 0.0)
    ready = []
    r, w, _ = _syscall_wrapper(
        self._select, True, self._readers, self._writers, timeout
    )
    r = set(r)
    w = set(w)
    for fd in r | w:
        events = 0
        if fd in r:
            events |= EVENT_READ
        if fd in w:
            events |= EVENT_WRITE

        key = self._key_from_fd(fd)
        if key:
            ready.append((key, events & key.events))
    return ready


# Traceback (TypeError)
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 138, in run
res = self._execute()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 561, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/command.py", line 24, in run
results = merge_hash(results, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 810, in _execute_module
res = self._low_level_execute_command(cmd, sudoable=sudoable, in_data=in_data)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 917, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/ssh.py", line 984, in exec_command
(returncode, stdout, stderr) = self._run(cmd, in_data, sudoable=sudoable)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/ssh.py", line 258, in wrapped
return_tuple = func(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/ssh.py", line 878, in _run
return self._bare_run(cmd, in_data, sudoable=sudoable, checkrc=checkrc)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/ssh.py", line 715, in _bare_run
events = selector.select(timeout)
File "/usr/lib/python2.7/dist-packages/ansible/compat/selectors/_selectors2.py", line 464, in select
maxevents=max_events)
File "/usr/lib/python2.7/dist-packages/ansible/compat/selectors/_selectors2.py", line 139, in _syscall_wrapper
raise OSError(errno=errno.ETIMEDOUT)
TypeError: exceptions.OSError does not take keyword arguments

fatal: [staging.bizlock.net]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}

# Fixed code
def select(self, timeout=None):
    # Selecting on empty lists on Windows errors out.
    if not len(self._readers) and not len(self._writers):
        return []

    timeout = None if timeout is None else max(timeout, 0.0)
    ready = []
    r, w, _ = _syscall_wrapper(
        self._select, True, self._readers, self._writers, timeout=timeout
    )
    r = set(r)
    w = set(w)
    for fd in r | w:
        events = 0
        if fd in r:
            events |= EVENT_READ
        if fd in w:
            events |= EVENT_WRITE

        key = self._key_from_fd(fd)
        if key:
            ready.append((key, events & key.events))
    return ready