summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-06-17 08:03:26 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-06-17 08:03:26 -0400
commit3ec2fc27deefc647127c9e729221826a90fd7a96 (patch)
treeb25a52fa6cf1a7c4d3fff561af76e62fb237d3b2 /src/lib/Server/Plugins
parent18368164103d047cf742f0679b4a8cb9ab5cb9c2 (diff)
downloadbcfg2-3ec2fc27deefc647127c9e729221826a90fd7a96.tar.gz
bcfg2-3ec2fc27deefc647127c9e729221826a90fd7a96.tar.bz2
bcfg2-3ec2fc27deefc647127c9e729221826a90fd7a96.zip
Improved handling of JSON data from probes
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Probes.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/Server/Plugins/Probes.py b/src/lib/Server/Plugins/Probes.py
index b07c4dfd3..ec0f294dd 100644
--- a/src/lib/Server/Plugins/Probes.py
+++ b/src/lib/Server/Plugins/Probes.py
@@ -6,19 +6,22 @@ try:
import json
has_json = True
except ImportError:
- has_json = False
+ try:
+ import simplejson as json
+ has_json = True
+ except ImportError:
+ has_json = False
try:
import syck
has_syck = True
except ImportError:
has_syck = False
-
-try:
- import yaml
- has_yaml = True
-except ImportError:
- has_yaml = False
+ try:
+ import yaml
+ has_yaml = True
+ except ImportError:
+ has_yaml = False
import Bcfg2.Server.Plugin