summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-09-06 13:56:43 -0500
committerGunnar Mills <gmills@us.ibm.com>2017-09-07 15:25:57 -0500
commit296395c1667d7554532585de41cdeba774834bb9 (patch)
treebea7e08e962ba55f66742ad9162c1c8cbe08365a
parentaeac98bdca848875bc8420999cfd928f08f98013 (diff)
downloadphosphor-objmgr-296395c1667d7554532585de41cdeba774834bb9.tar.gz
phosphor-objmgr-296395c1667d7554532585de41cdeba774834bb9.zip
Fix bug in mapper for associations KeyError
In the active software image associations, the associations property is initially empty, associations are added as images become active. Remove the check for an empty associations property. This check was causing the 'associations' dict object to not be created, which was causing the KeyError. Resolves openbmc/openbmc#2263 Change-Id: Ibc11d92d7bb99d22fbb31ed7b6196165431cee55 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--.gitignore1
-rw-r--r--obmc/mapper/server.py3
2 files changed, 2 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index ea7c12a..62fefe1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,4 +107,5 @@ stamp-h1
*.o
m4/
mapper
+!mapper/
setup.py
diff --git a/obmc/mapper/server.py b/obmc/mapper/server.py
index f5370f0..e09bbbf 100644
--- a/obmc/mapper/server.py
+++ b/obmc/mapper/server.py
@@ -87,8 +87,7 @@ def find_dbus_interfaces(conn, service, path, callback, error_callback, **kw):
try:
iface = obmc.dbuslib.enums.OBMC_ASSOCIATIONS_IFACE
self.assoc_pending.remove(path)
- if associations:
- self.results[path][iface]['associations'] = associations
+ self.results[path][iface]['associations'] = associations
except Exception, e:
error_callback(service, path, e)
return None
OpenPOWER on IntegriCloud