3915124e532d — Martin B. 10 years ago
Fixed small coding issues that cause errors
1 files changed, 2 insertions(+), 2 deletions(-)

M djpubsubhubbub/views.py
M djpubsubhubbub/views.py +2 -2
@@ 69,7 69,7 @@ def callback(request, pk):
         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 @@ def callback(request, pk):
 
             updated.send(sender=subscription, update=parsed)
             return HttpResponse('')
-    return Http404
+    raise Http404