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 <bradleyb@fuzziesquirrel.com>
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 @@
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())