From ee222868a7af31597a63fc2c3fc72d93ecb2b93d Mon Sep 17 00:00:00 2001 From: Jacob Henry Date: Thu, 8 Nov 2018 20:07:53 -0500 Subject: [PATCH] Minor typo --- slack_util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slack_util.py b/slack_util.py index 95b8871..2eb8803 100644 --- a/slack_util.py +++ b/slack_util.py @@ -1,9 +1,9 @@ import re -from asyncio import Task from time import sleep -from typing import Any, Optional, Generator, Match, Callable, List, Coroutine, AsyncGenerator +from typing import Any, Optional, Generator, Match, Callable, List, Coroutine from slackclient import SlackClient +from slackclient.client import SlackNotConnected import channel_util @@ -79,7 +79,7 @@ def message_stream(slack: SlackClient) -> Generator[dict, None, None]: for item in update: if item.get('type') == 'message': yield item - except OSError as e: + except (SlackNotConnected, OSError) as e: print("Error while reading messages:") print(e) except (ValueError, TypeError):