summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-03 15:18:20 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-03 15:18:20 -0400
commitfc296f452029120c79c25444195f346855ed6dde (patch)
tree120964f923e633a9456de782a47308a491c81100
parent7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35 (diff)
downloadbcfg2-fc296f452029120c79c25444195f346855ed6dde.tar.gz
bcfg2-fc296f452029120c79c25444195f346855ed6dde.tar.bz2
bcfg2-fc296f452029120c79c25444195f346855ed6dde.zip
get encoding a better way in packages collection objects
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py5
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Collection.py2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index 0b620c2d2..7fe98ea92 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -29,11 +29,6 @@ from Bcfg2.Bcfg2Py3k import Queue
from Bcfg2.Bcfg2Py3k import Empty
from Bcfg2.Bcfg2Py3k import Full
-# make encoding available
-encparse = Bcfg2.Options.OptionParser({'encoding': Bcfg2.Options.ENCODING})
-encparse.parse([])
-encoding = encparse['encoding']
-
# grab default metadata info from bcfg2.conf
opts = {'owner': Bcfg2.Options.MDATA_OWNER,
'group': Bcfg2.Options.MDATA_GROUP,
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
index da88a1315..a42561f2e 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
@@ -52,7 +52,7 @@ class Collection(Bcfg2.Server.Plugin.Debuggable):
@property
def cachekey(self):
- return md5(self.sourcelist().encode(Bcfg2.Server.Plugin.encoding)).hexdigest()
+ return md5(self.sourcelist().encode(self.setup['encoding'])).hexdigest()
def get_config(self):
self.logger.error("Packages: Cannot generate config for host %s with "