2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Fix get_network_channel for BMCs that dislike 0xe

For channel 0xe, we can skip checking if the channel
is active, since, obviously, we are connected to that
channel.  Since *current* active channel cannot be
inactive, assume that is good if seen.

Change-Id: I894bd27e6c76bb9ace0959566117ad6a6f8866ad
This commit is contained in:
Jarrod Johnson 2017-04-19 17:04:47 -04:00
parent b9b9620a9d
commit 130ef46579

View File

@ -841,8 +841,11 @@ class Command(object):
try:
# Some implementations denote an inactive channel
# by refusing to do parameter retrieval
self.xraw_command(
netfn=0xc, command=2, data=(channel, 5, 0, 0))
if channel != 0xe:
# skip checking if channel is active if we are
# actively using the channel
self.xraw_command(
netfn=0xc, command=2, data=(channel, 5, 0, 0))
# If still here, the channel seems serviceable...
# However some implementations may still have
# ambiguous channel info, that will need to be