summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Probes.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-15 10:27:47 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-15 11:28:05 -0400
commit32536152850a683e18935eb5223a5bd1410e9258 (patch)
tree3c12e9f72bee87b5c84c818362fe595178688acc /src/lib/Bcfg2/Server/Plugins/Probes.py
parent96108cfae8b68d6265e4643ea9519bdfd9127752 (diff)
downloadbcfg2-32536152850a683e18935eb5223a5bd1410e9258.tar.gz
bcfg2-32536152850a683e18935eb5223a5bd1410e9258.tar.bz2
bcfg2-32536152850a683e18935eb5223a5bd1410e9258.zip
added support for JSON and YAML properties files
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Probes.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py
index c63f015e5..c2a928e0f 100644
--- a/src/lib/Bcfg2/Server/Plugins/Probes.py
+++ b/src/lib/Bcfg2/Server/Plugins/Probes.py
@@ -41,16 +41,10 @@ except ImportError:
HAS_JSON = False
try:
- import syck as yaml
- import syck.error as YAMLError
+ import yaml
HAS_YAML = True
except ImportError:
- try:
- import yaml
- from yaml import YAMLError
- HAS_YAML = True
- except ImportError:
- HAS_YAML = False
+ HAS_YAML = False
class ClientProbeDataSet(dict):
@@ -110,7 +104,7 @@ class ProbeData(str):
if self._yaml is None and HAS_YAML:
try:
self._yaml = yaml.load(self.data)
- except YAMLError:
+ except yaml.YAMLError:
pass
return self._yaml