summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-15 10:49:23 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-15 10:49:23 -0400
commitdd72c3652a8abfa7a9f5a4a61f9c6ae2734319ea (patch)
tree1f1acca5e4f6fb3ff3e077ee996574e5e305cd0b
parent251070737f0cf69945ae2e2790e9fda28d79d546 (diff)
downloadbcfg2-dd72c3652a8abfa7a9f5a4a61f9c6ae2734319ea.tar.gz
bcfg2-dd72c3652a8abfa7a9f5a4a61f9c6ae2734319ea.tar.bz2
bcfg2-dd72c3652a8abfa7a9f5a4a61f9c6ae2734319ea.zip
models: copy SERVER_PLUGINS option to avoid changing the real default, just the local default
-rw-r--r--src/lib/Bcfg2/Server/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/models.py b/src/lib/Bcfg2/Server/models.py
index 0328c6bea..1f64111e7 100644
--- a/src/lib/Bcfg2/Server/models.py
+++ b/src/lib/Bcfg2/Server/models.py
@@ -1,6 +1,7 @@
""" Django database models for all plugins """
import sys
+import copy
import logging
import Bcfg2.Options
import Bcfg2.Server.Plugins
@@ -19,7 +20,7 @@ def load_models(plugins=None, cfile='/etc/bcfg2.conf', quiet=True):
# we want to provide a different default plugin list --
# namely, _all_ plugins, so that the database is guaranteed to
# work, even if /etc/bcfg2.conf isn't set up properly
- plugin_opt = Bcfg2.Options.SERVER_PLUGINS
+ plugin_opt = copy.deepcopy(Bcfg2.Options.SERVER_PLUGINS)
plugin_opt.default = Bcfg2.Server.Plugins.__all__
setup = \