diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-15 10:27:47 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-15 11:28:05 -0400 |
commit | 32536152850a683e18935eb5223a5bd1410e9258 (patch) | |
tree | 3c12e9f72bee87b5c84c818362fe595178688acc /src/lib/Bcfg2/Server/Plugins/Probes.py | |
parent | 96108cfae8b68d6265e4643ea9519bdfd9127752 (diff) | |
download | bcfg2-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.py | 12 |
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 |