mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
avoids running abspath on None
This commit is contained in:
parent
a391857013
commit
82603bb2a0
1 changed files with 3 additions and 1 deletions
|
@ -576,7 +576,9 @@ class Inventory(object):
|
||||||
if dname is None or dname == '' or dname == '.':
|
if dname is None or dname == '' or dname == '.':
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
dname = cwd
|
dname = cwd
|
||||||
return os.path.abspath(dname)
|
if dname:
|
||||||
|
dname = os.path.abspath(dname)
|
||||||
|
return dname
|
||||||
|
|
||||||
def src(self):
|
def src(self):
|
||||||
""" if inventory came from a file, what's the directory and file name? """
|
""" if inventory came from a file, what's the directory and file name? """
|
||||||
|
|
Loading…
Reference in a new issue