From 78b7a3a115c6a156d16fe74e4b08b1f18fae0787 Mon Sep 17 00:00:00 2001 From: Dietmar Schinnerl Date: Sat, 22 Sep 2012 17:01:37 +0200 Subject: [PATCH] [Issue #1075] Fixing setup module fails if PATH is not set on target host --- lib/ansible/module_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index e95dd0d64c..32bba60164 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -239,7 +239,7 @@ class AnsibleModule(object): for d in opt_dirs: if d is not None and os.path.exists(d): paths.append(d) - paths += os.environ.get('PATH').split(':') + paths += os.environ.get('PATH', '').split(':') bin_path = None # mangle PATH to include /sbin dirs for p in sbin_paths: