Skip to content
Browse files

Updated the list of things that might go wrong when fetching a feed...

  • Loading branch information...
1 parent 9a68d15 commit 07ee7c12cf63012ec1a4a6adf472f905b9c7b587 @jacobian jacobian committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 django_website/aggregator/management/commands/
6 django_website/aggregator/management/commands/
@@ -1,5 +1,6 @@
import socket
import urllib2
+import httplib
from import BaseCommand
from django_website.aggregator.models import Feed
@@ -10,8 +11,9 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
for f in Feed.objects.filter(is_defunct=False):
- r = urllib2.urlopen(f.feed_url, timeout=15)
- except (urllib2.HTTPError, urllib2.URLError, socket.timeout), e:
+ urllib2.urlopen(f.feed_url, timeout=15)
+ except (urllib2.HTTPError, urllib2.URLError, httplib.HTTPException,
+ socket.timeout), e:
print "%s on '%s'; marking defunct" % (e, f)
f.is_defunct = True

0 comments on commit 07ee7c1

Please sign in to comment.
Something went wrong with that request. Please try again.