mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixed extension filtering in InventoryDirectory
This commit is contained in:
parent
bcfef8d0d4
commit
92bd755b47
1 changed files with 3 additions and 4 deletions
|
@ -40,9 +40,8 @@ class InventoryDirectory(object):
|
|||
for i in self.names:
|
||||
|
||||
# Skip files that end with certain extensions or characters
|
||||
for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo"):
|
||||
if i.endswith(ext):
|
||||
continue
|
||||
if any(i.endswith(ext) for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo")):
|
||||
continue
|
||||
# Skip hidden files
|
||||
if i.startswith('.') and not i.startswith('./'):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue