# HG changeset patch # User Martin B. # Date 1375200171 -7200 # Tue Jul 30 18:02:51 2013 +0200 # Node ID 3915124e532da03828b64586396b704c8c89aaab # Parent ddbc1f4328f3888f622e11f19c12dfb6e17500f7 Fixed small coding issues that cause errors diff --git a/djpubsubhubbub/views.py b/djpubsubhubbub/views.py --- a/djpubsubhubbub/views.py +++ b/djpubsubhubbub/views.py @@ -69,7 +69,7 @@ parsed = feedparser.parse( getattr(request, 'body', request.raw_post_data), ) - if parsed.feed.links: # single notification + if hasattr(parsed.feed, 'links'): # single notification hub_url = subscription.hub self_url = subscription.topic for link in parsed.feed.links: @@ -95,4 +95,4 @@ updated.send(sender=subscription, update=parsed) return HttpResponse('') - return Http404 + raise Http404