Remove dead is_method_error code
According to
https://lists.ozlabs.org/pipermail/openbmc/2018-October/013696.html,
The is_method_error() function will never return true
and can be removed.
Change-Id: I9f86e979ddd1854e9c98c23a3a235bc4adbd79f4
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/dbus.cpp b/dbus.cpp
index f0eb0b9..aee1654 100644
--- a/dbus.cpp
+++ b/dbus.cpp
@@ -41,16 +41,7 @@
auto reply = bus.call(method);
- if (reply.is_method_error())
- {
- log<level::ERR>("Failed to get managed objects",
- entry("SERVICE=%s", service.c_str()),
- entry("PATH=%s", objPath.c_str()));
- }
- else
- {
- reply.read(interfaces);
- }
+ reply.read(interfaces);
return interfaces;
}
@@ -67,17 +58,7 @@
method.append(interface);
auto reply = bus.call(method);
- if (reply.is_method_error())
- {
- log<level::ERR>("Failed to get all properties",
- entry("SERVICE=%s", service.c_str()),
- entry("PATH=%s", objPath.c_str()),
- entry("INTERFACE=%s", interface.c_str()));
- }
- else
- {
- reply.read(properties);
- }
+ reply.read(properties);
return properties;
}
@@ -94,15 +75,7 @@
method.append(std::vector<std::string>({interface}));
auto reply = bus.call(method);
- if (reply.is_method_error())
- {
- log<level::ERR>("Failed to get subtree", entry("ROOT=%s", root.c_str()),
- entry("INTERFACE=%s", interface.c_str()));
- }
- else
- {
- reply.read(tree);
- }
+ reply.read(tree);
return tree;
}