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

Commit 7ebf3df

Browse files
author
James Bell
authored
Merge pull request #100 from CameronJHall/master
Changed HTTPError to RequestException in Notifier
2 parents e10671f + c94ed98 commit 7ebf3df

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='tgt_grease',
7-
version='2.6.0',
7+
version='2.6.1',
88
license="MIT",
99
description='Modern distributed automation engine built with love by Target',
1010
long_description="""
@@ -34,6 +34,7 @@
3434
test_suite='nose.collector',
3535
tests_require=['nose', 'nose-cover3', 'mock'],
3636
install_requires=[
37+
'urllib3==1.24.3',
3738
'psycopg2-binary',
3839
'requests',
3940
'pymongo',

tgt_grease/core/Notifier.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from tgt_grease.core import Configuration
22
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
3-
from urllib3.exceptions import HTTPError
43
import requests
54
import json
65

@@ -147,7 +146,7 @@ def send_hipchat_message(self, message, level, color=None):
147146
return True
148147
else:
149148
return False
150-
except HTTPError:
149+
except requests.exceptions.RequestException:
151150
return False
152151

153152
def send_slack_message(self, message):
@@ -170,6 +169,5 @@ def send_slack_message(self, message):
170169
headers={'Content-Type': 'application/json'}
171170
)
172171
return True
173-
except HTTPError:
172+
except requests.exceptions.RequestException:
174173
return False
175-

0 commit comments

Comments
 (0)