File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,16 @@ def output(self):
120120 message = output [1 ]
121121 # things that start with U are users. convert to an IM channel.
122122 if destination .startswith ('U' ):
123- result = json .loads (self .slack_client .api_call ('im.open' , user = destination ))
123+ try :
124+ result = json .loads (self .slack_client .api_call ('im.open' , user = destination ))
125+ except ValueError :
126+ self ._dbg ("Parse error on im.open call results!" )
124127 channel = self .slack_client .server .channels .find (result [u'channel' ][u'id' ])
125128 elif destination .startswith ('G' ):
126- result = json .loads (self .slack_client .api_call ('groups.open' ), channel = destination ))
129+ try :
130+ result = json .loads (self .slack_client .api_call ('groups.open' ), channel = destination ))
131+ except ValueError :
132+ self ._dbg ("Parse error on groups.open call results!" )
127133 channel = self .slack_client .server .channels .find (result [u'channel' ][u'id' ])
128134 else :
129135 channel = self .slack_client .server .channels .find (destination )
You can’t perform that action at this time.
0 commit comments