1
0
Fork 0
forked from github/pelican

Deep copy _DEFAULT_SETTINGS instead of linking.

This caused the defaults to be overwritten and edge case bugs with tests.
The test for empty setting needed to be updated to reflect that the method
for setting up the local settings sets extra settings.
This commit is contained in:
tBunnyMan 2012-08-29 12:17:59 -07:00
commit 644fd4ed5f
4 changed files with 15 additions and 9 deletions

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import copy
import locale
import logging
import functools
@ -29,7 +30,7 @@ class Page(object):
if not metadata:
metadata = {}
if not settings:
settings = _DEFAULT_CONFIG
settings = copy.deepcopy(_DEFAULT_CONFIG)
self.settings = settings
self._content = content