Support custom port for Mattermost (Slack) notifications

This commit is contained in:
JonnyWong16 2017-06-24 21:34:53 -07:00
parent 428a5cc0ff
commit cd417aaf44

View file

@ -2062,9 +2062,10 @@ class SLACK(object):
data['attachments'] = [attachment]
slackhost = urlparse(self.slack_hook).hostname
slackport = urlparse(self.slack_hook).port
slackpath = urlparse(self.slack_hook).path
http_handler = HTTPSConnection(slackhost)
http_handler = HTTPSConnection(slackhost, slackport)
http_handler.request("POST",
slackpath,
headers={'Content-type': "application/json"},