Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit 8aecb8e

Browse files
committed
Merge pull request scrapinghub#24 from jathanism/crashfix
Fix periodic crash when looking up username in dispatcher.
2 parents 5d4b259 + 99ace57 commit 8aecb8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

slackbot/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _on_new_message(self, msg):
5050
try:
5151
msguser = self._client.users.get(msg['user'])
5252
username = msguser['name']
53-
except KeyError:
53+
except (KeyError, TypeError):
5454
if 'username' in msg:
5555
username = msg['username']
5656
else:

0 commit comments

Comments
 (0)