Mercurial > piecrust2
changeset 975:a0a62d0da723
internal: Check that the `Assetor` has an asset URL format to work with.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 17 Oct 2017 01:08:56 -0700 |
parents | 72f17534d58e |
children | b9374b3682f0 |
files | piecrust/data/assetor.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/data/assetor.py Tue Oct 17 01:07:30 2017 -0700 +++ b/piecrust/data/assetor.py Tue Oct 17 01:08:56 2017 -0700 @@ -81,6 +81,8 @@ app = source.app root_dir = app.root_dir asset_url_format = app.config.get('site/asset_url_format') + if not asset_url_format: + raise Exception("No asset URL format was specified.") page_uri = self._page.getUri() pretty_urls = app.config.get('site/pretty_urls')