2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 04:32:11 +00:00

Fix handling of socket error with neighbor

If a system is half up, a different sort of timeout is given.
Handle this and also preserve the original exception better
if not one of these two.
This commit is contained in:
Jarrod Johnson 2019-07-25 08:52:47 -04:00
parent 64cc2416d1
commit 8641885f86

View File

@ -169,7 +169,7 @@ class IpmiCommandWrapper(ipmicommand.Command):
try:
super(IpmiCommandWrapper, self).__init__(**kwargs)
except socket.error as se:
if se[1] == 'EHOSTUNREACH':
if isinstance(se, socket.timeout) or (len(se) > 1 and se[1] == 'EHOSTUNREACH'):
raise exc.TargetEndpointUnreachable('timeout')
raise
except pygexc.PyghmiException as pe: