Mercurial > piecrust2
diff piecrust/data/base.py @ 392:923a9b96411d
data: Fix regression bug with accessing page metadata that doesn't exist.
Added unit test.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 17 May 2015 15:25:54 -0700 |
parents | 4c9eab0e283b |
children | fd8e39254da0 |
line wrap: on
line diff
--- a/piecrust/data/base.py Sun May 17 10:48:41 2015 -0700 +++ b/piecrust/data/base.py Sun May 17 15:25:54 2015 -0700 @@ -89,7 +89,8 @@ (name, self._page.rel_path)) from ex # We always keep the wildcard loader in the loaders list. - assert name in self._values + if name not in self._values: + raise LazyPageConfigLoaderHasNoValue() return self._values[name] def _setValue(self, name, value):