test/ctlmgr: keep trying to ping on OSError

Since Python 3.5.2, this exception can be raised on Windows when the
connection fails.
This commit is contained in:
Sebastien Bourdeauducq 2016-07-08 12:40:04 +08:00
parent 2a5a1f320f
commit 375e821bd8
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ class ControllerCase(unittest.TestCase):
except asyncio.TimeoutError:
timeout -= dt
except (ConnectionAbortedError, ConnectionError,
ConnectionRefusedError, ConnectionResetError):
ConnectionRefusedError, ConnectionResetError,
OSError):
await asyncio.sleep(dt)
timeout -= dt
raise asyncio.TimeoutError