fix inventory.basedir is not absolute path when hostfile is startswith "./"
This commit is contained in:
parent
4d1f447908
commit
51a180b150
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ class Inventory(object):
|
|||
if not self.is_file():
|
||||
return None
|
||||
dname = os.path.dirname(self.host_list)
|
||||
if dname is None or dname == '':
|
||||
if dname is None or dname == '' or dname == '.':
|
||||
cwd = os.getcwd()
|
||||
return cwd
|
||||
return dname
|
||||
|
|
Loading…
Reference in a new issue