# HG changeset patch # User Ludovic Chabant # Date 1438143791 25200 # Node ID 39175c48a4ae01c8a78e656924b69dafa26b6076 # Parent bab91fcef7413c204058048371b4c169b187a6f0 config: Make sure `site/auto_formats` has at least `html`. diff -r bab91fcef741 -r 39175c48a4ae piecrust/app.py --- a/piecrust/app.py Tue Jul 28 18:34:21 2015 -0700 +++ b/piecrust/app.py Tue Jul 28 21:23:11 2015 -0700 @@ -150,9 +150,8 @@ if not isinstance(sitec['auto_formats'], dict): raise ConfigurationError("The 'site/auto_formats' setting must be " "a dictionary.") - html_auto_format = sitec['auto_formats'] - if not html_auto_format: - sitec['auto_formats']['html'] = sitec['default_format'] + # Check that `.html` is in there. + sitec['auto_formats'].setdefault('html', sitec['default_format']) cachec['auto_formats_re'] = r"\.(%s)$" % ( '|'.join( [re.escape(i) for i in