From 4da4882a8a061ae70f3a66213e55101369d7b11b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 24 Oct 2006 10:39:57 +0000 Subject: [PATCH] Enable recognition of _mtime_ that doesn't rely on cache mtime mangling. svn path=/main/trunk/; revision=4808 --- pym/cache/flat_hash.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py index 722e9f184..d4c5930c7 100644 --- a/pym/cache/flat_hash.py +++ b/pym/cache/flat_hash.py @@ -26,7 +26,10 @@ class database(fs_template.FsBased): myf = open(fp, "r") try: d = self._parse_data(myf, cpv) - d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) + if "_mtime_" not in d: + """Backward compatibility with old cache that uses mtime + mangling.""" + d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) return d finally: myf.close() -- 2.26.2