Fixing issue where user agent doesn't exist.

This commit is contained in:
Samuel Clay 2013-05-02 17:52:21 -07:00
parent 39f063d157
commit 2e6f1af4a2

View file

@ -1208,7 +1208,7 @@ def shared_stories_rss_feed(request, user_id, username):
logging.user(request, "~FBGenerating ~SB%s~SN's RSS feed: ~FM%s" % ( logging.user(request, "~FBGenerating ~SB%s~SN's RSS feed: ~FM%s" % (
user.username, user.username,
request.META['HTTP_USER_AGENT'][:24] request.META.get('HTTP_USER_AGENT', "")[:24]
)) ))
return HttpResponse(rss.writeString('utf-8'), content_type='application/rss+xml') return HttpResponse(rss.writeString('utf-8'), content_type='application/rss+xml')