mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-21 11:05:32 +01:00
Fix for pep8
This commit is contained in:
@@ -889,6 +889,7 @@ class TELEGRAM(object):
|
||||
logger.info(u"Telegram notifications sent.")
|
||||
return sent_successfuly
|
||||
|
||||
|
||||
class SLACK(object):
|
||||
|
||||
def notify(self, message, status):
|
||||
@@ -901,7 +902,7 @@ class SLACK(object):
|
||||
channel = headphones.CONFIG.SLACK_CHANNEL
|
||||
emoji = headphones.CONFIG.SLACK_EMOJI
|
||||
|
||||
payload = { 'channel': channel, 'text': status + ': ' + message, 'icon_emoji': emoji}
|
||||
payload = {'channel': channel, 'text': status + ': ' + message, 'icon_emoji': emoji}
|
||||
|
||||
try:
|
||||
response = requests.post(SLACK_URL, json=payload)
|
||||
@@ -914,4 +915,4 @@ class SLACK(object):
|
||||
sent_successfuly = False
|
||||
|
||||
logger.info(u"Slack notifications sent.")
|
||||
return sent_successfuly
|
||||
return sent_successfuly
|
||||
|
||||
Reference in New Issue
Block a user