1
0
Fork 0
forked from github/pelican

simplify some code in utils.files_changed

This commit is contained in:
derdon 2011-05-14 17:08:04 +02:00
commit 93d0ad25d1

View file

@ -206,7 +206,7 @@ def files_changed(path, extensions):
"""Return True if the files have changed since the last check""" """Return True if the files have changed since the last check"""
def with_extension(f): def with_extension(f):
return True if True in [f.endswith(ext) for ext in extensions] else False return any(f.endswith(ext) for ext in extensions)
def file_times(path): def file_times(path):
"""Return the last time files have been modified""" """Return the last time files have been modified"""