From 83a08b2a64676cd97ac059739e41bbb77ac79403 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 c0a0547d45a..b90eccc4e11 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1772,7 +1772,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