avoid errors from possible None/False args

This commit is contained in:
Brian Coca 2016-02-04 18:42:27 -05:00
parent 75b6f61619
commit 5679b5414c

View file

@ -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