mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Replace os.access with stat calls for determining the executability of a given path.
This commit is contained in:
parent
734db4ffe9
commit
29ac1a8efc
3 changed files with 16 additions and 2 deletions
|
@ -76,7 +76,7 @@ class Inventory(object):
|
|||
all.add_host(Host(tokens[0], tokens[1]))
|
||||
else:
|
||||
all.add_host(Host(x))
|
||||
elif os.access(host_list, os.X_OK):
|
||||
elif utils.is_executable(host_list):
|
||||
self._is_script = True
|
||||
self.parser = InventoryScript(filename=host_list)
|
||||
self.groups = self.parser.groups.values()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue