bindings: python: change the interpretation of None in event wait
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 23 May 2023 13:29:29 +0000 (15:29 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 24 May 2023 09:12:49 +0000 (11:12 +0200)
commita0b8bcee3f46b42b16d9073252934694a971af96
tree84155144d6bbd015314425c4ac78a4db9b0f6ed5
parent8f3cd2b6b4c4038a8f87cd89d78edb0ec2c9dff6
bindings: python: change the interpretation of None in event wait

The docs don't mention it but currently passing None as the timeout to
one of the event wait methods works like passing 0 to select() - the wait
method returns immediately. Change it to a more standard behavior - None
makes the method block indefinitely until an event becomes available for
reading.

This is a slight change in the behavior but let's hope nobody complains
as libgpiod v2 is still pretty recent and its adoption is (hopegully)
not wide-spread yet.

Reported-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Suggested-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Kent Gibson <warthog618@gmail.com>
bindings/python/gpiod/chip.py
bindings/python/gpiod/internal.py
bindings/python/gpiod/line_request.py