chassis: Remove sensor subscription
Remove a signal subscription from the deprecated
org.openbmc.SensorThresholds interface.
Change-Id: I75d83324ada77642a8f560b4250fb24190dc540a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pychassisctl/chassis_control.py b/pychassisctl/chassis_control.py
index c25c2ff..68281e6 100644
--- a/pychassisctl/chassis_control.py
+++ b/pychassisctl/chassis_control.py
@@ -82,10 +82,6 @@
dbus_interface="org.openbmc.Watchdog",
signal_name="WatchdogError")
- bus.add_signal_receiver(self.emergency_shutdown_signal_handler,
- dbus_interface="org.openbmc.SensorThresholds",
- signal_name="Emergency")
-
bus.add_signal_receiver(self.SystemStateHandler,
signal_name="GotoSystemState")
@@ -189,25 +185,6 @@
print "Watchdog Error, Going to quiesce"
self.quiesce()
- def emergency_shutdown_signal_handler(self, message):
- print "Emergency Shutdown!"
- # Log an event.
- try:
- # Exception happens or not, we need to power off.
- obj = bus.get_object("org.openbmc.records.events",
- "/org/openbmc/records/events",
- introspect=False)
- intf = dbus.Interface(obj, "org.openbmc.recordlog")
- desc = message
- sev = "critical error"
- details = "Get emergency shutdown signal. Shutdown the host."
- debug = dbus.ByteArray("")
- intf.acceptBMCMessage(desc, sev, details, debug)
- except Exception as e:
- print "Emergency shutdown signal handler: log event error."
- print e
- self.powerOff()
-
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)