summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Admin/Init.py2
-rw-r--r--src/lib/Bcfg2/Server/Plugins/GroupLogic.py2
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Reporting.py5
3 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Admin/Init.py b/src/lib/Bcfg2/Server/Admin/Init.py
index 153d7bea6..fdab5abca 100644
--- a/src/lib/Bcfg2/Server/Admin/Init.py
+++ b/src/lib/Bcfg2/Server/Admin/Init.py
@@ -113,7 +113,7 @@ def create_key(hostname, keypath, certpath, country, state, location):
hostname,
keypath))
subprocess.call((kcstr), shell=True)
- ccstr = ("openssl req -batch -new -subj '/C=%s/ST=%s/L=%s/CN=%s' -key %s "
+ ccstr = ("openssl req -batch -new -subj '/C=%s/ST=%s/L=%s/CN=%s' -key %s "
"| openssl x509 -req -days 1000 -signkey %s -out %s" % (country,
state,
location,
diff --git a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
index d74c16e8b..24547949b 100644
--- a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
+++ b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py
@@ -66,7 +66,7 @@ class GroupLogic(Bcfg2.Server.Plugin.Plugin,
return []
self._local.building.add(metadata.hostname)
rv = []
- for el in self.config.get_xml_value(metadata).findall("Group"):
+ for el in self.config.get_xml_value(metadata).xpath("//Group"):
if el.get("category"):
rv.append(MetadataGroup(el.get("name"),
category=el.get("category")))
diff --git a/src/lib/Bcfg2/Server/Plugins/Reporting.py b/src/lib/Bcfg2/Server/Plugins/Reporting.py
index 3354763d4..fa11d9250 100644
--- a/src/lib/Bcfg2/Server/Plugins/Reporting.py
+++ b/src/lib/Bcfg2/Server/Plugins/Reporting.py
@@ -57,7 +57,7 @@ class Reporting(Statistics, Threaded, PullSource, Debuggable):
self.logger.error(msg)
raise PluginInitError(msg)
- def start_threads(self):
+ # This must be loaded here for bcfg2-admin
try:
self.transport = load_transport_from_config(self.core.setup)
except TransportError:
@@ -68,6 +68,9 @@ class Reporting(Statistics, Threaded, PullSource, Debuggable):
if self.debug_flag:
self.transport.set_debug(self.debug_flag)
+ def start_threads(self):
+ pass
+
def set_debug(self, debug):
rv = Debuggable.set_debug(self, debug)
if self.transport is not None: