Fixed extension filtering in InventoryDirectory

pull/7412/head
Kevin Bell 12 years ago
parent bcfef8d0d4
commit 92bd755b47

@ -40,8 +40,7 @@ class InventoryDirectory(object):
for i in self.names: for i in self.names:
# Skip files that end with certain extensions or characters # Skip files that end with certain extensions or characters
for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo"): if any(i.endswith(ext) for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo")):
if i.endswith(ext):
continue continue
# Skip hidden files # Skip hidden files
if i.startswith('.') and not i.startswith('./'): if i.startswith('.') and not i.startswith('./'):

Loading…
Cancel
Save