2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-11 13:57:52 +00:00

python tests: Fixed OSError not iterable on Windows

On Windows if this exception is triggered then it will raise an exception while in the
exception handler.

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
This commit is contained in:
Paul Boca
2016-08-02 17:45:43 +00:00
committed by Gurucharan Shetty
parent 7b9d1b65eb
commit 8ac6d39624

View File

@@ -17,6 +17,7 @@ import ovs.timeval
import ovs.vlog
import select
import socket
import os
try:
import eventlet.patcher
@@ -168,6 +169,11 @@ class Poller(object):
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