Skip to content

Commit

Permalink
python tests: Fixed OSError not iterable on Windows
Browse files Browse the repository at this point in the history
On Windows if this exception is triggered then it will raise an exception while in the
exception handler.

Signed-off-by: Paul-Daniel Boca <[email protected]>
Acked-by: Alin Gabriel Serdean <[email protected]>
Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
Paul Boca authored and shettyg committed Aug 3, 2016
1 parent 7b9d1b6 commit 8ac6d39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/ovs/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import ovs.vlog
import select
import socket
import os

try:
import eventlet.patcher
Expand Down Expand Up @@ -168,6 +169,11 @@ def block(self):
try:
events = self.poll.poll(self.timeout)
self.__log_wakeup(events)
except OSError as e:
""" On Windows, the select function from poll raises OSError
exception if the polled array is empty."""
if e.errno != errno.EINTR:
vlog.err("poll: %s" % os.strerror(e.errno))
except select.error as e:
# XXX rate-limit
error, msg = e
Expand Down

0 comments on commit 8ac6d39

Please sign in to comment.