Mercurial > piecrust2
comparison piecrust/data/assetor.py @ 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 | 9d804fa186a0 |
children | 8adc27285d93 |
comparison
equal
deleted
inserted
replaced
974:72f17534d58e | 975:a0a62d0da723 |
---|---|
79 return | 79 return |
80 | 80 |
81 app = source.app | 81 app = source.app |
82 root_dir = app.root_dir | 82 root_dir = app.root_dir |
83 asset_url_format = app.config.get('site/asset_url_format') | 83 asset_url_format = app.config.get('site/asset_url_format') |
84 if not asset_url_format: | |
85 raise Exception("No asset URL format was specified.") | |
84 | 86 |
85 page_uri = self._page.getUri() | 87 page_uri = self._page.getUri() |
86 pretty_urls = app.config.get('site/pretty_urls') | 88 pretty_urls = app.config.get('site/pretty_urls') |
87 if not pretty_urls: | 89 if not pretty_urls: |
88 page_uri, _ = os.path.splitext(page_uri) | 90 page_uri, _ = os.path.splitext(page_uri) |