[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:
Junchao-Mellanox 2022-01-27 13:36:56 +08:00 committed by GitHub
parent 1ac140a945
commit 8e590da563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,7 @@ class sfp_event:
found = 0
try:
read, _, _ = select.select([self.rx_fd_p.fd], [], [], timeout)
read, _, _ = select.select([self.rx_fd_p.fd], [], [], float(timeout) / 1000)
print(read)
except select.error as err:
rc, msg = err