diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-16 13:28:06 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-17 09:25:45 -0500 |
commit | ebe7542db7217c2fac3d7111e80f94caedfb69e2 (patch) | |
tree | 964db7ae511795d80b3ae50f3e14bc9f3344756a /src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py | |
parent | ae58c24f72a8ed72327fbc3f7305bd69ec6a13db (diff) | |
download | bcfg2-ebe7542db7217c2fac3d7111e80f94caedfb69e2.tar.gz bcfg2-ebe7542db7217c2fac3d7111e80f94caedfb69e2.tar.bz2 bcfg2-ebe7542db7217c2fac3d7111e80f94caedfb69e2.zip |
added module-level OptionParser to avoid passing it as an argument or global all over
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py index 824d01023..11c60ad2c 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py @@ -4,7 +4,7 @@ access. """ import lxml.etree from Bcfg2.Server.Plugin import StructFile, PluginExecutionError -from Bcfg2.Server.Plugins.Cfg import CfgGenerator, SETUP, CFG +from Bcfg2.Server.Plugins.Cfg import CfgGenerator, CFG from Bcfg2.Server.Plugins.Metadata import ClientMetadata @@ -35,9 +35,9 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile): def category(self): """ The name of the metadata category that generated keys are specific to """ - if (SETUP.cfp.has_section("sshkeys") and - SETUP.cfp.has_option("sshkeys", "category")): - return SETUP.cfp.get("sshkeys", "category") + if (self.setup.cfp.has_section("sshkeys") and + self.setup.cfp.has_option("sshkeys", "category")): + return self.setup.cfp.get("sshkeys", "category") return None def handle_event(self, event): |