mirror of
https://opendev.org/x/pyghmi
synced 2026-03-29 14:23:32 +00:00
Avoid exception on close
If close is called and the remote BMC session no longer works, do not pass up worrisome trace to a caller, which is calling close() to try to make sure things are clean and here there is just some part that was already done. Change-Id: Ib0c770b57eb0f204bcde6fc786e8f064f02ece1a
This commit is contained in:
@@ -182,8 +182,13 @@ class Console(object):
|
||||
"""
|
||||
self.ipmi_session.unregister_keepalive(self.keepaliveid)
|
||||
if self.activated:
|
||||
self.ipmi_session.raw_command(netfn=6, command=0x49,
|
||||
data=(1, 1, 0, 0, 0, 0))
|
||||
try:
|
||||
self.ipmi_session.raw_command(netfn=6, command=0x49,
|
||||
data=(1, 1, 0, 0, 0, 0))
|
||||
except exc.IpmiException:
|
||||
# if underlying ipmi session is not working, then
|
||||
# run with the implicit success
|
||||
pass
|
||||
|
||||
def send_data(self, data):
|
||||
if self.broken:
|
||||
|
||||
Reference in New Issue
Block a user