mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Provide better trace capture for AttributeErrors under ipmi
The ipmi plugin would erroneously treat all AttributeErrors following from 'next()' as indicating the top level was not a generator/iterator.
This commit is contained in:
parent
c514c2c121
commit
6069eceb23
@ -21,7 +21,6 @@ import eventlet.green.threading as threading
|
||||
import eventlet.greenpool as greenpool
|
||||
import eventlet.queue
|
||||
import pyghmi.constants as pygconstants
|
||||
import pyghmi.exceptions as pygexc
|
||||
import pyghmi.ipmi.console as console
|
||||
import pyghmi.ipmi.command as ipmicommand
|
||||
import socket
|
||||
@ -184,6 +183,10 @@ class IpmiIterator(object):
|
||||
try:
|
||||
retdata = self.currdata.next()
|
||||
except AttributeError:
|
||||
if hasattr(self.currdata, 'next'):
|
||||
# the attribute error is not the immediate
|
||||
# one, raise it to be caught as normal
|
||||
raise
|
||||
retdata = self.currdata
|
||||
self.currdata = None
|
||||
return retdata
|
||||
|
Loading…
Reference in New Issue
Block a user