mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Replace settings.get(key) with settings[key] for default settings
If a setting exists in DEFAULT_CONFIG, assume it will be there (instead of checking and/or providing a local default). The earlier code was split between the two idioms, which was confusing.
This commit is contained in:
parent
c8e7d95b34
commit
8ff34e6c5d
8 changed files with 35 additions and 38 deletions
|
|
@ -51,7 +51,7 @@ class Content(object):
|
|||
self._context = context
|
||||
self.translations = []
|
||||
|
||||
local_metadata = dict(settings.get('DEFAULT_METADATA', ()))
|
||||
local_metadata = dict(settings['DEFAULT_METADATA'])
|
||||
local_metadata.update(metadata)
|
||||
|
||||
# set metadata as attributes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue