From 2ef549c2aee76db83b31d516080e3c73004262e0 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 28 Jul 2017 16:05:10 -0400 Subject: [PATCH] Correct the NullLock NullLock was not what util.protect was expecting, provide more function calls, all of which do nothing. --- .../confluent/plugins/hardwaremanagement/ipmi.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 2f6b6da2..ff8a0e6a 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -40,11 +40,14 @@ import socket # are not actually dangerously multiplexed... so we can replace with # a null context manager for now class NullLock(object): - def __enter__(self, *args, **kwargs): + + def donothing(self, *args, **kwargs): return 1 - def __exit__(self, *args, **kwargs): - return 1 + __enter__ = donothing + __exit__ = donothing + acquire = donothing + release = donothing console.session.select = eventlet.green.select console.session.threading = eventlet.green.threading