diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-18 11:06:41 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-18 11:06:41 -0500 |
commit | c2133f115673670992048f3567c22e7478281a79 (patch) | |
tree | 829dd8af6c689cb3d547b3f47518f6d197d3e5b7 /src | |
parent | 84b9fabb4895b38eeddefdcc417301e8ae1befc4 (diff) | |
download | bcfg2-c2133f115673670992048f3567c22e7478281a79.tar.gz bcfg2-c2133f115673670992048f3567c22e7478281a79.tar.bz2 bcfg2-c2133f115673670992048f3567c22e7478281a79.zip |
StructFile: fixed lax/strict decryption setting with no crypto libs installed
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/helpers.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index 399ab6679..b036fc31d 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -598,15 +598,12 @@ class StructFile(XMLFileBacked): def Index(self): XMLFileBacked.Index(self) - if self.encryption: + if self.encryption and HAS_CRYPTO: strict = self.xdata.get( "decrypt", self.setup.cfp.get(Bcfg2.Encryption.CFG_SECTION, "decrypt", default="strict")) == "strict" for el in self.xdata.xpath("//*[@encrypted]"): - if not HAS_CRYPTO: - raise PluginExecutionError("%s: M2Crypto is not available" - % self.name) try: el.text = self._decrypt(el).encode('ascii', 'xmlcharrefreplace') |