1
0
Fork 0
forked from github/pelican

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:
W. Trevor King 2013-03-24 15:45:36 -04:00
commit 8ff34e6c5d
8 changed files with 35 additions and 38 deletions

View file

@ -154,7 +154,7 @@ class Pelican(object):
context = self.settings.copy()
context['filenames'] = {} # share the dict between all the generators
context['localsiteurl'] = self.settings.get('SITEURL') # share
context['localsiteurl'] = self.settings['SITEURL'] # share
generators = [
cls(
context,
@ -309,7 +309,7 @@ def get_instance(args):
settings = read_settings(config_file, override=get_config(args))
cls = settings.get('PELICAN_CLASS')
cls = settings['PELICAN_CLASS']
if isinstance(cls, six.string_types):
module, cls_name = cls.rsplit('.', 1)
module = __import__(module)