Fixing a couple small bugs.

This commit is contained in:
Samuel Clay 2013-10-07 16:16:38 -07:00
parent 673fc9bd76
commit 07c5f95c36
3 changed files with 6 additions and 3 deletions

View file

@ -46,7 +46,10 @@ class IconImporter(object):
# print "Bad .ICO"
pass
image = self.normalize_image(image)
try:
color = self.determine_dominant_color_in_image(image)
except IndexError:
return
try:
image_str = self.string_from_image(image)
except TypeError:

View file

@ -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

View file

@ -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