diff --git a/apps/rss_feeds/icon_importer.py b/apps/rss_feeds/icon_importer.py index ae433b027..561b80b6e 100644 --- a/apps/rss_feeds/icon_importer.py +++ b/apps/rss_feeds/icon_importer.py @@ -46,7 +46,10 @@ class IconImporter(object): # print "Bad .ICO" pass image = self.normalize_image(image) - color = self.determine_dominant_color_in_image(image) + try: + color = self.determine_dominant_color_in_image(image) + except IndexError: + return try: image_str = self.string_from_image(image) except TypeError: diff --git a/apps/social/models.py b/apps/social/models.py index 95450e249..9a1b18b68 100644 --- a/apps/social/models.py +++ b/apps/social/models.py @@ -1861,7 +1861,7 @@ class MSharedStory(mongo.Document): for c, comment in enumerate(story[comment_set]): if comment['user_id'] not in profiles: continue stories[s][comment_set][c]['user'] = profiles[comment['user_id']] - if comment['source_user_id']: + if comment['source_user_id'] and comment['source_user_id'] in profiles: stories[s][comment_set][c]['source_user'] = profiles[comment['source_user_id']] for r, reply in enumerate(comment['replies']): if reply['user_id'] not in profiles: continue diff --git a/config/requirements.txt b/config/requirements.txt index 532a263a7..798ad665a 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -33,7 +33,7 @@ python-gflags==2.0 pytz==2013b raven==3.1.17 readline==6.2.4.1 -redis==2.7.2 +redis==2.8.0 hiredis==0.1.1 requests==1.1.0 seacucumber==1.5