From 5679b5414cbb2a46ca2f38acb5dec2c011cf645a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 4 Feb 2016 18:42:27 -0500 Subject: [PATCH] avoid errors from possible None/False args --- lib/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 70439a6c06..cfa0e9b02b 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1825,7 +1825,7 @@ class AnsibleModule(object): # expand things like $HOME and ~ if not shell: - args = [ os.path.expandvars(os.path.expanduser(x)) for x in args ] + args = [ os.path.expandvars(os.path.expanduser(x)) for x in args if x ] rc = 0 msg = None