You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
Mark Goddard aa36b02ede
Fix fileglob plugin with non-existent subdirectory (#69451)
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing
a subdirectory of a non-existent directory, it will fail. For example:

lookup('fileglob', '/'): ok
lookup('fileglob', '/foo'): (non-existent): ok
lookup('fileglob', '/foo/bar'): (non-existent): FAIL

The exact error depends on Python 2 or 3, but here is the error on
Python 2:

    AttributeError: 'NoneType' object has no attribute 'endswith'

And on Python 3:

    TypeError: expected str, bytes or os.PathLike object, not NoneType

This change fixes the issue by skipping paths that are falsey before
passing them to os.path.join().

Fixes: #69450
6 years ago
..
ansible_test Relocate ansible-test self tests outside package. (#61255) 7 years ago
integration Fix fileglob plugin with non-existent subdirectory (#69451) 6 years ago
lib/ansible_test Add Fedora 32 to CI (#69222) 6 years ago
sanity lint 6 years ago
support Remove left hand side slicing 6 years ago
units Fix SemanticVersion comparison (#69395) 6 years ago
utils/shippable Testing: Add support for CentOS Linux On Power platform (#68130) 6 years ago