From fdb56e4bad9384c1b8028723216c10ddb45a3da2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sun, 20 Mar 2016 12:55:48 -0700 Subject: [PATCH] avoid bad path entries --- lib/ansible/module_utils/basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 06f4727e8a5..e57b1943aab 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1546,6 +1546,8 @@ class AnsibleModule(object): if p not in paths and os.path.exists(p): paths.append(p) for d in paths: + if not d: + continue path = os.path.join(d, arg) if os.path.exists(path) and is_executable(path): bin_path = path