Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Twitter API endpoint to use HTTPS; improve logging

  • Loading branch information...
commit 72e9faef68be2ea49e332ab8a44eb913f61b2617 1 parent e985d18
@look look authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 stashboard/handlers/admin.py
View
4 stashboard/handlers/admin.py
@@ -478,14 +478,14 @@ def post(self):
try:
resp, content = client.request(
- 'http://api.twitter.com/1.1/statuses/update.json',
+ 'https://api.twitter.com/1.1/statuses/update.json',
method='POST',
body=urllib.urlencode({'status': '[%s - %s] %s' % (service_name, status_name, message)})
)
if resp.status == 200:
logging.info('Tweet successful: [%s - %s] %s' % (service_name, status_name, message))
else:
- logging.error('Tweet failed: %s' % resp)
+ logging.error('Tweet failed: Response headers: %s; Response content: %s' % (resp, content))
except socket.timeout:
logging.error('Unable to post to Twitter API.')
Please sign in to comment.
Something went wrong with that request. Please try again.