sherlock
sherlock copied to clipboard
`timeout=0` doesn't work
Firstly, thanks for the great package
I wanted to set timeout=0 to effectively have just one attempt to get the lock, but the code is as follows:
if kwargs.get('timeout'):
self.timeout = kwargs['timeout']
else:
self.timeout = _configuration.timeout
And so the 0 is Falsey and it instead uses _configuration.timeout when it shouldn't.
I'd suggest this be changed to:
if 'timeout' in kwargs:
self.timeout = kwargs['timeout']
else:
self.timeout = _configuration.timeout
Thanks.