Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set feed update timeouts in a more modern way.

  • Loading branch information...
commit 10a0d12f39760d2c2d57f66bc445f0cb87cde69f 1 parent 338fa65
@jacobian jacobian authored
View
3  django_website/aggregator/management/commands/mark_defunct_feeds.py
@@ -10,8 +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)
+ r = urllib2.urlopen(f.feed_url, timeout=15)
except urllib2.HTTPError, e:
if e.code == 404 or e.code == 500:
if verbose:
Please sign in to comment.
Something went wrong with that request. Please try again.