From 086c18c641c8b988a83961135d361c1eb62aa514 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 Jan 2014 09:47:06 -0500 Subject: [PATCH] Have ipmi plugin print out traceback data when exceptions would be encountered For now, see the errors even as they are tolerated. This allows problems to be fixed as best as possible. Ultimately, this will be logged. --- plugins/hardwaremanagement/ipmi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/hardwaremanagement/ipmi.py b/plugins/hardwaremanagement/ipmi.py index 1efd144f..bcb942d2 100644 --- a/plugins/hardwaremanagement/ipmi.py +++ b/plugins/hardwaremanagement/ipmi.py @@ -43,8 +43,8 @@ def _ipmi_evtloop(): except RuntimeError: raise except: - import sys - print sys.exc_info()[2] + import traceback + traceback.print_exc() def _process_chgs(intline): #here we receive functions to run in our thread @@ -65,8 +65,8 @@ def _process_chgs(intline): if len(cval) > 2: cval[2](rv) except: # assure the thread does not crash and burn - import sys - print sys.exc_info()[2] + import traceback + traceback.print_exc() # If we are inside a loop within pyghmi, this is our only shot # so we have to wake up anything that might be interested in # state changes here as well as the evtloop