diff options
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index 3904ab0..b1ccb09 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2031,10 +2031,9 @@ def handle_rtmstart(login_data, eventrouter): """ This handles the main entry call to slack, rtm.start """ - if login_data["ok"]: - - metadata = pickle.loads(login_data["wee_slack_request_metadata"]) + metadata = pickle.loads(login_data["wee_slack_request_metadata"]) + if login_data["ok"]: # Let's reuse a team if we have it already. th = SlackTeam.generate_team_hash(login_data['self']['name'], login_data['team']['domain']) if not eventrouter.teams.get(th): @@ -2103,6 +2102,10 @@ def handle_rtmstart(login_data, eventrouter): dbg("connected to {}".format(t.domain)) + else: + w.prnt("", "ERROR: Failed connecting to Slack with token {}: {}" + .format(metadata.token, login_data["error"])) + # self.identifier = self.domain def handle_channelsinfo(channel_json, eventrouter, **kwargs): |