summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Probes.py
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-06-06 22:36:16 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-06-06 22:36:16 -0500
commit92d6996f8767482fe6a099a1e6937196800b44a3 (patch)
tree6bf9545b1848e79b83d666a9634cf5186607a945 /src/lib/Bcfg2/Server/Plugins/Probes.py
parentb85e47f2aab6d4412a4dda2de1f9471f979f18b8 (diff)
downloadbcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.tar.gz
bcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.tar.bz2
bcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.zip
Probes: Handle write failures better
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Probes.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py
index 22cacde55..042146aa7 100644
--- a/src/lib/Bcfg2/Server/Plugins/Probes.py
+++ b/src/lib/Bcfg2/Server/Plugins/Probes.py
@@ -217,9 +217,9 @@ class Probes(Bcfg2.Server.Plugin.Plugin,
pretty_print='true')
try:
datafile = open("%s/%s" % (self.data, 'probed.xml'), 'w')
+ datafile.write(data.decode('utf-8'))
except IOError:
self.logger.error("Failed to write probed.xml")
- datafile.write(data.decode('utf-8'))
def load_data(self):
try: