Catch websocket connection close errors in cleanup

This can add useless noise when we have timeouts in particular.

Change-Id: I55d18885f06e530ff9a5492c0b98f37525e88ed6
Closes-Bug: #1805647
This commit is contained in:
Thomas Herve 2018-11-28 16:12:35 +01:00
parent 2a2fe4f58c
commit 5935afe40c
1 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,10 @@ class WebsocketClient(object):
def __exit__(self, *exc):
"""Call cleanup when exiting the context manager"""
self.cleanup()
try:
self.cleanup()
except websocket.WebSocketConnectionClosedException:
pass
class ClientWrapper(object):