mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Handling broken twitter oauth credentials when sycning twitter photos.
This commit is contained in:
parent
d644238aed
commit
5e59d740e5
1 changed files with 9 additions and 2 deletions
|
@ -2553,8 +2553,15 @@ class MSocialServices(mongo.Document):
|
|||
if profile.photo_service != "twitter":
|
||||
return
|
||||
|
||||
api = self.twitter_api()
|
||||
me = api.me()
|
||||
try:
|
||||
api = self.twitter_api()
|
||||
me = api.me()
|
||||
except tweepy.TweepError, e:
|
||||
print " ***> Exception (%s): setting to blank profile photo" % e
|
||||
self.twitter_picture_url = None
|
||||
self.set_photo("nothing")
|
||||
return
|
||||
|
||||
self.twitter_picture_url = me.profile_image_url_https
|
||||
self.save()
|
||||
self.set_photo('twitter')
|
||||
|
|
Loading…
Add table
Reference in a new issue