Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a timeout so we don't get stuck on urls that behave badly.

  • Loading branch information...
commit 2e5fe6fe1444275af5a6aaaec2f11ff5d496cacf 1 parent d1065f5
@PaulMcMillan PaulMcMillan authored
View
1  django_website/aggregator/management/commands/mark_defunct_feeds.py
@@ -10,6 +10,7 @@ def handle(self, *args, **kwargs):
verbose = kwargs.get('verbosity')
for f in Feed.objects.all():
try:
+ socket.setdefaulttimeout(15)
r = urllib2.urlopen(f.feed_url)
except urllib2.HTTPError, e:
if e.code == 404 or e.code == 500:
Please sign in to comment.
Something went wrong with that request. Please try again.