# HG changeset patch # User Ludovic Chabant # Date 1487225706 28800 # Node ID b8f089092281ac2ac4e97296bbbaf34f7d711e70 # Parent 89a44af17062291c4757d2844c01ceaf1de13c6c bug: Fix crashes for commands run outside of a website. diff -r 89a44af17062 -r b8f089092281 piecrust/appconfig.py --- a/piecrust/appconfig.py Sun Feb 05 22:54:08 2017 -0800 +++ b/piecrust/appconfig.py Wed Feb 15 22:15:06 2017 -0800 @@ -97,11 +97,6 @@ paths.append(self._path) paths += self._custom_paths - if len(paths) == 0: - raise ConfigurationError( - "No paths to load configuration from. " - "Specify paths, or set the values directly.") - # Build the cache-key. path_times = [os.path.getmtime(p) for p in paths] cache_key_hash = hashlib.md5( @@ -112,7 +107,7 @@ cache_key = cache_key_hash.hexdigest() # Check the cache for a valid version. - if self._cache.isValid('config.json', path_times): + if path_times and self._cache.isValid('config.json', path_times): logger.debug("Loading configuration from cache...") config_text = self._cache.read('config.json') self._values = json.loads(