diff options
author | James Cammarata <jimi@sngx.net> | 2016-09-21 15:52:26 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2016-09-21 15:52:26 -0500 |
commit | 36356ecf350a6885691e2e86c9c98c4cf1545e1c (patch) | |
tree | 114ed4187f343a17cb9037b6ec4f08a2f1c4c35a | |
parent | 23651b657e53f9b65c8a157bd370027d5f9b7abb (diff) | |
download | ansible-issue_17192_fileglob_broken.tar.gz |
Allow for empty source in dwim_path_relative_stackissue_17192_fileglob_broken
Fixes #17192
-rw-r--r-- | lib/ansible/parsing/dataloader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/parsing/dataloader.py b/lib/ansible/parsing/dataloader.py index 1dc9632ddd..2b0c997547 100644 --- a/lib/ansible/parsing/dataloader.py +++ b/lib/ansible/parsing/dataloader.py @@ -291,9 +291,9 @@ class DataLoader(): b_source = to_bytes(source) result = None - if not source: - display.warning('Invalid request to find a file that matches an empty string or "null" value') - elif source.startswith('~') or source.startswith(os.path.sep): + if source is None: + display.warning('Invalid request to find a file that matches a "null" value') + elif source and (source.startswith('~') or source.startswith(os.path.sep)): # path is absolute, no relative needed, check existence and return source test_path = unfrackpath(b_source) if os.path.exists(to_bytes(test_path, errors='surrogate_or_strict')): |