Commit c8b49392 authored by Daniele Venzano's avatar Daniele Venzano

Catch the right exception to fix pylint error

parent 2023f676
......@@ -37,7 +37,7 @@ import docker.errors
import docker.utils
import docker.models.containers
import requests.packages
import requests.exceptions
from zoe_lib.config import get_conf
from zoe_lib.state import Service
......@@ -291,7 +291,7 @@ class SwarmClient:
while True:
try:
event = next(event_gen)
except requests.packages.urllib3.exceptions.ProtocolError:
except requests.exceptions.RequestException:
log.warning('Docker closed event connection, retrying...')
event_gen = self.cli.events(decode=True)
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment