mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-05 02:03:09 +00:00
avoids running abspath on None
This commit is contained in:
@@ -576,7 +576,9 @@ class Inventory(object):
|
||||
if dname is None or dname == '' or dname == '.':
|
||||
cwd = os.getcwd()
|
||||
dname = cwd
|
||||
return os.path.abspath(dname)
|
||||
if dname:
|
||||
dname = os.path.abspath(dname)
|
||||
return dname
|
||||
|
||||
def src(self):
|
||||
""" if inventory came from a file, what's the directory and file name? """
|
||||
|
||||
Reference in New Issue
Block a user