[Mellanox] Fix select timeout in sfp event (#9795)
- Why I did it Python select.select accept a optional timeout value in seconds, however, the value passes to it is a value in millisecond. - How I did it Transfer the value to millisecond. - How to verify it Manual test
This commit is contained in:
parent
1ac140a945
commit
8e590da563
@ -257,7 +257,7 @@ class sfp_event:
|
|||||||
found = 0
|
found = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
read, _, _ = select.select([self.rx_fd_p.fd], [], [], timeout)
|
read, _, _ = select.select([self.rx_fd_p.fd], [], [], float(timeout) / 1000)
|
||||||
print(read)
|
print(read)
|
||||||
except select.error as err:
|
except select.error as err:
|
||||||
rc, msg = err
|
rc, msg = err
|
||||||
|
Loading…
Reference in New Issue
Block a user