2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Correct the NullLock

NullLock was not what util.protect was expecting, provide more function calls, all of which do nothing.
This commit is contained in:
Jarrod Johnson 2017-07-28 16:05:10 -04:00
parent 8123a77451
commit 2ef549c2ae

View File

@ -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