diff options
author | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:58:29 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:58:29 +0100 |
commit | c2521f0e1538fd69d2c6d52801117a487abc2d04 (patch) | |
tree | 99066af2d59852f491ada720c5eafe0be09f5f59 /wee_slack.py | |
parent | 7c470c47a4b2ea7f49836174d65dd87e15024fd1 (diff) | |
download | wee-slack-c2521f0e1538fd69d2c6d52801117a487abc2d04.tar.gz |
More debugging
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index 71a9268..c76bf5e 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1713,6 +1713,7 @@ def async_slack_api_request(domain, token, request, post_data, priority=False): post_data["token"] = token url = 'url:https://{}/api/{}?{}'.format(domain, request, urllib.urlencode(post_data)) context = pickle.dumps({"request": request, "token": token, "post_data": post_data}) + dbg("URL: {} context: {} params: {}".format(url, context, params) w.hook_process(url, 20000, "url_processor_cb", context) # funny, right? @@ -1753,9 +1754,10 @@ def url_processor_cb(data, command, return_code, out, err): if "channel" in my_json: if "members" in my_json["channel"]: channels.find(my_json["channel"]["id"]).members = set(my_json["channel"]["members"]) - elif return_code != -1: - big_data.pop(identifier, None) - dbg("return code: {}".format(return_code)) + else: + if return_code != -1: + big_data.pop(identifier, None) + dbg("return code: {}, data: {}".format(return_code, data)) return w.WEECHAT_RC_OK |