From 69cb6d18c5ff35a3a598de00a348f4e270c6b5f7 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Tue, 21 Feb 2017 12:01:52 -0500 Subject: Fix attr PUT after empty interface Fix an issue that occurs when doing a PUT using the attr endpoint when an object has an interface without properties. Change-Id: Ib3b2bb81dd287365851e6a67fec0c33479fdc543 Signed-off-by: Brad Bishop --- module/obmc/wsgi/apps/rest_dbus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py index 6582190..2c284c6 100644 --- a/module/obmc/wsgi/apps/rest_dbus.py +++ b/module/obmc/wsgi/apps/rest_dbus.py @@ -324,7 +324,7 @@ class PropertyHandler(RouteHandler): def get_host_interface_on_bus(self, path, prop, iface, bus, interfaces): for i in interfaces: properties = self.try_properties_interface(iface.GetAll, i) - if properties is None: + if not properties: continue prop = obmc.utils.misc.find_case_insensitive( prop, properties.keys()) -- cgit v1.2.1