Commit 41039e5c authored by echel0n's avatar echel0n

Fixed KeyError for twitter notifier.

parent 135d8685
# Changelog
- * 98e7330 - 2019-02-24: Fixed AttributeError for gktorrent provider. Refactored log messages for rss cache updater to debug.
- * 3a00fef - 2019-02-24: Fixed KeyError for twitter notifier.
- * 135d868 - 2019-02-24: Fixed AttributeError for gktorrent provider. Refactored log messages for rss cache updater to debug.
- * ffd8fa4 - 2019-02-24: Release v9.4.73
- * 47572b6 - 2019-02-24: Release v9.4.72
- * b86d9d2 - 2019-02-23: Release v9.4.71
......
......@@ -120,12 +120,12 @@ class TwitterNotifier(Notifiers):
access_token_key = sickrage.app.config.twitter_username
access_token_secret = sickrage.app.config.twitter_password
sickrage.app.log.debug("Sending tweet: " + message)
sickrage.app.log.debug("Sending tweet: {}".format(message))
api = twitter.Api(username, password, access_token_key, access_token_secret)
try:
api.PostUpdate(message.encode('utf8')[:139])
api.PostUpdate(message.encode('utf-8')[:279])
except Exception as e:
sickrage.app.log.error("Error Sending Tweet: {}".format(e))
return False
......@@ -140,12 +140,12 @@ class TwitterNotifier(Notifiers):
access_token_key = sickrage.app.config.twitter_username
access_token_secret = sickrage.app.config.twitter_password
sickrage.app.log.debug("Sending DM: " + dmdest + " " + message)
sickrage.app.log.debug("Sending DM: @{}: {}".format(dmdest, message))
api = twitter.Api(username, password, access_token_key, access_token_secret)
try:
api.PostDirectMessage(message.encode('utf8')[:139], dmdest)
api.PostDirectMessage(message.encode('utf-8'), screen_name=dmdest)
except Exception as e:
sickrage.app.log.error("Error Sending Tweet (DM): {}".format(e))
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment