From f06813cd2223eac967b29ff6968b55350528f685 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Mon, 9 May 2016 11:36:53 +0100 Subject: [PATCH] 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 --- pyghmi/ipmi/bmc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/bmc.py b/pyghmi/ipmi/bmc.py index 4606ebce..f4090c5d 100644 --- a/pyghmi/ipmi/bmc.py +++ b/pyghmi/ipmi/bmc.py @@ -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)