comparison piecrust/appconfig.py @ 686:1a6c4c2683fd

internal: Fix incorrect check for cache times.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 13 Mar 2016 16:55:12 -0700
parents ec384174b8b2
children ab5c6a8ae90a
comparison
equal deleted inserted replaced
685:77cec2fa0e83 686:1a6c4c2683fd
82 # Figure out where to load this configuration from. 82 # Figure out where to load this configuration from.
83 paths = [self._theme_path, self._path] + self._custom_paths 83 paths = [self._theme_path, self._path] + self._custom_paths
84 paths = list(filter(lambda i: i is not None, paths)) 84 paths = list(filter(lambda i: i is not None, paths))
85 85
86 # Build the cache-key. 86 # Build the cache-key.
87 path_times = [os.path.getmtime(p[0]) for p in paths] 87 path_times = [os.path.getmtime(p) for p in paths]
88 cache_key_hash = hashlib.md5( 88 cache_key_hash = hashlib.md5(
89 ("version=%s&cache=%d" % ( 89 ("version=%s&cache=%d" % (
90 APP_VERSION, CACHE_VERSION)).encode('utf8')) 90 APP_VERSION, CACHE_VERSION)).encode('utf8'))
91 for p in paths: 91 for p in paths:
92 cache_key_hash.update(("&path=%s" % p).encode('utf8')) 92 cache_key_hash.update(("&path=%s" % p).encode('utf8'))