2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 03:37:47 +00:00

Allows BMCs to configure the event loop timeout

This patch is adding a new parameter called "timeout" to the listen()
method of the Bmc class to allow configuring the right timeout for the
IPMI session. The default timeout continues to be 30 seconds, just like
it was when hardcoded.

Change-Id: Ie00d62157eea321747e02492b0a3d1d6ff991024
This commit is contained in:
Lucas Alvares Gomes 2016-05-09 11:36:53 +01:00
parent 6f807ebc42
commit f06813cd22

View File

@ -142,6 +142,6 @@ class Bmc(serversession.IpmiServer):
traceback.print_exc()
@classmethod
def listen(cls):
def listen(cls, timeout=30):
while True:
ipmisession.Session.wait_for_rsp(30)
ipmisession.Session.wait_for_rsp(timeout)