[amdsmi] Dont crash on node handle error (#2206)
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
This commit is contained in:
@@ -82,13 +82,11 @@ class AMDSMICommands():
|
||||
nh = amdsmi_interface.amdsmi_get_node_handle(dev)
|
||||
if nh is not None:
|
||||
self.node_handle = nh
|
||||
continue
|
||||
# Only need one handle, break after first success
|
||||
break
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
if e.err_code in (amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NOT_SUPPORTED,
|
||||
amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_INVAL):
|
||||
logging.debug("Unable to get node handle: %s", e.get_error_info())
|
||||
else:
|
||||
raise e
|
||||
logging.debug("Unable to get node handle: %s", e.get_error_info())
|
||||
# Node handle functionality is optional, so don't raise an error
|
||||
|
||||
if self.helpers.is_amd_hsmp_initialized():
|
||||
try:
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user