Commit 2432b45e by Kevin Bell Committed by James Cammarata

Fixed extension filtering in InventoryDirectory

parent d6214c5d
......@@ -40,8 +40,7 @@ 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):
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('./'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment