files_changed: cleanup and add a test

This commit is contained in:
Simon 2012-03-14 12:36:55 +01:00
commit 39bdbcfd86
2 changed files with 20 additions and 5 deletions

View file

@ -210,9 +210,6 @@ LAST_MTIME = 0
def files_changed(path, extensions):
"""Return True if the files have changed since the last check"""
def with_extension(f):
return any(f.endswith(ext) for ext in extensions)
def file_times(path):
"""Return the last time files have been modified"""
for root, dirs, files in os.walk(path):