summaryrefslogtreecommitdiffstats
path: root/mock.py
diff options
context:
space:
mode:
Diffstat (limited to 'mock.py')
-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']: