Merge pull request #3814 from ftao/inventory_dir_abs

fix inventory.basedir is not absolute path when hostfile is startswith "./"
pull/3818/merge
Michael DeHaan 11 years ago
commit 17aa0d12de

@ -392,7 +392,7 @@ class Inventory(object):
if not self.is_file(): if not self.is_file():
return None return None
dname = os.path.dirname(self.host_list) dname = os.path.dirname(self.host_list)
if dname is None or dname == '': if dname is None or dname == '' or dname == '.':
cwd = os.getcwd() cwd = os.getcwd()
return cwd return cwd
return dname return dname

Loading…
Cancel
Save