Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid (very unlikely) case of config=None
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 4, 2017
1 parent 6fdaad3 commit 6c6096f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/utils.py
Expand Up @@ -2105,6 +2105,6 @@ def map_metadata(meta, key, config):
This uses the METADATA_MAPPING setting (via ``config``) and modifies the dict in place.
"""
for foreign, ours in config['METADATA_MAPPING'].get(key, {}).items():
for foreign, ours in config.get('METADATA_MAPPING', {}).get(key, {}).items():
if foreign in meta:
meta[ours] = meta[foreign]

0 comments on commit 6c6096f

Please sign in to comment.