diff -r 301d738b1181 -r 70b6c13d084f lib/utils.py --- a/lib/utils.py Thu Jan 31 17:58:03 2008 +0000 +++ b/lib/utils.py Thu Jan 31 19:13:00 2008 +0000 @@ -18,7 +18,7 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -import os.path +import os, os.path import settings @@ -80,3 +80,10 @@ def strip_path (path) : return path.lstrip('.').lstrip('/') +def mtime (path) : + try : + return os.stat(path).st_mtime + except OSError : + # no such file or directory + return None +