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,3 +1,4 @@
import copy
import os
import re
import sys
@ -29,7 +30,7 @@ class Pelican(object):
before doing anything else.
"""
if settings is None:
settings = _DEFAULT_CONFIG
settings = copy.deepcopy(_DEFAULT_CONFIG)
self.path = path or settings['PATH']
if not self.path: