diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 22:36:16 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 22:36:16 -0500 |
commit | 92d6996f8767482fe6a099a1e6937196800b44a3 (patch) | |
tree | 6bf9545b1848e79b83d666a9634cf5186607a945 /src/lib/Bcfg2/Server | |
parent | b85e47f2aab6d4412a4dda2de1f9471f979f18b8 (diff) | |
download | bcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.tar.gz bcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.tar.bz2 bcfg2-92d6996f8767482fe6a099a1e6937196800b44a3.zip |
Probes: Handle write failures better
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Probes.py | 2 |
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: |