summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/sbin/bcfg26
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 247f5102b..b9364cf2f 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -111,8 +111,8 @@ class Client:
def run_probe(self, probe):
'''Execute probe'''
- probe_name = probe.attrib['name']
- ret = Bcfg2.Client.XML.Element("probe-data", probe_name, source=probe.attrib['source'])
+ name = probe.get('name')
+ ret = Bcfg2.Client.XML.Element("probe-data", name=name, source=probe.get('source'))
try:
script = open(tempfile.mktemp(), 'w+')
try:
@@ -125,7 +125,7 @@ class Client:
finally:
os.unlink(script.name)
except:
- self.logger.error("Failed to execute probe: %s" % (probe_name), exc_info=1)
+ self.logger.error("Failed to execute probe: %s" % (name), exc_info=1)
raise SystemExit, 1
return ret