Remove try/catch defaulting PSU presence to false
During an earlier commit for openbmc/openbmc#1731, a change was made to
default the power supply presence to false if the inventory manager did
not yet have a present property available for a power supply instance.
This should have been, and eventually was, better handled via the
service files used for starting the application.
https://gerrit.openbmc-project.xyz/#/c/6018/15..25/
Change-Id: Idcde1d9c405465606dbffd23372122e893caf3d2
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index b1013da..277a800 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -174,19 +174,8 @@
std::string path = INVENTORY_OBJ_PATH + inventoryPath;
std::string service = "xyz.openbmc_project.Inventory.Manager";
- try
- {
- util::getProperty(INVENTORY_INTERFACE, PRESENT_PROP, path,
- service, bus, this->present);
- }
- catch (std::exception& e)
- {
- // If we happen to be trying to update presence just as it is being
- // updated, we may encounter a runtime_error. Just catch that for
- // now, let the inventoryChanged signal handler update presence later.
- present = false;
- }
-
+ util::getProperty(INVENTORY_INTERFACE, PRESENT_PROP, path,service, bus,
+ this->present);
}
void PowerSupply::powerStateChanged(sdbusplus::message::message& msg)