summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Redhat.py2
-rw-r--r--src/lib/Client/Toolset.py12
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py
index 3eb3b2a6e..c38778454 100644
--- a/src/lib/Client/Redhat.py
+++ b/src/lib/Client/Redhat.py
@@ -99,7 +99,7 @@ class ToolsetImpl(Toolset):
if entry.get('version') == self.installed[entry.get('name')]:
if entry.get('multiarch'):
archs = entry.get('multiarch').split()
- info = self.saferun('rpm -q %s --qf "%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n"' % (entry.get('name')))[1]
+ info = self.saferun('rpm -q %s --qf "%%{NAME} %%{VERSION}-%%{RELEASE} %%{ARCH}\n"' % (entry.get('name')))[1]
while info:
(_, vers, arch) = info.pop()
if arch in archs:
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index 598ec9293..4035402b8 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -191,7 +191,11 @@ class Toolset(object):
failures = [key for key in ent.attrib if key[:8] == 'current_']
for fail in failures:
for field in [fail, fail[8:]]:
- newent.set(field, ent.get(field))
+ try:
+ newent.set(field, ent.get(field))
+ except TypeError:
+ self.logger.error("Failed to set field %s for entry %s, value" %
+ (field, ent.get('name'), ent.get(field)))
if 'severity' in ent.attrib:
newent.set('severity', ent.get('severity'))
#if ent.tag not in ['Package', 'Service', 'SymLink', 'ConfigFile']:
@@ -207,7 +211,11 @@ class Toolset(object):
failures = [key for key in ent.attrib if key[:8] == 'current_']
for fail in failures:
for field in [fail, fail[8:]]:
- newent.set(field, ent.get(field))
+ try:
+ newent.set(field, ent.get(field))
+ except TypeError:
+ self.logger.error("Failed to set field %s for entry %s, value" %
+ (field, ent.get('name'), ent.get(field)))
if 'severity' in ent.attrib:
newent.set('severity', ent.get('severity'))
if self.extra_services + self.pkgwork['remove']: