summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-08-01 23:45:22 -0500
committerMichael E Brown <mebrown@michaels-house.net>2007-08-01 23:45:22 -0500
commit6f3c7f0c021ec45659dcdd5226962cc019cbcd09 (patch)
treeffbe671ad5d313341964d3062ff137be26801129
parentf4e23e3a5cda4b324640c256b26717b983e51b63 (diff)
downloadmock-6f3c7f0c021ec45659dcdd5226962cc019cbcd09.tar.gz
mock-6f3c7f0c021ec45659dcdd5226962cc019cbcd09.tar.xz
mock-6f3c7f0c021ec45659dcdd5226962cc019cbcd09.zip
BZ 250425. Set rebuild_cache=0 to disable rebuilding of cache.
-rw-r--r--mock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mock.py b/mock.py
index de3adb9..8e9e7c1 100644
--- a/mock.py
+++ b/mock.py
@@ -241,7 +241,7 @@ class Root:
if cache_exists:
cache_mtime = os.stat(self.cache_file)[stat.ST_MTIME]
cache_age_days = (time.time() - cache_mtime) / (60 * 60 * 24)
- if cache_age_days > self.config['max_cache_age_days']:
+ if self.config['max_cache_age_days'] and cache_age_days > self.config['max_cache_age_days']:
self.config["rebuild_cache"] = True
if cache_exists and not self.config['rebuild_cache']: