Browse files

Only print if verbosity flag is used.

  • Loading branch information...
1 parent 99cf34d commit c6427f632dfb7dae0f43c472f34391bc4a12e142 @justinabrahms justinabrahms committed Sep 8, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 django_website/apps/aggregator/management/commands/mark_defunct_feeds.py
View
4 django_website/apps/aggregator/management/commands/mark_defunct_feeds.py
@@ -7,12 +7,14 @@ class Command(BaseCommand):
Mark people with 404'ing feeds as defunct.
"""
def handle(self, *args, **kwargs):
+ verbose = kwargs.get('verbosity')
for f in Feed.objects.all():
try:
r = urllib2.urlopen(f.feed_url)
except urllib2.HTTPError, e:
if e.code == 404 or e.code == 500:
- print "%s on %s; marking defunct" % (e.code, f)
+ if verbose:
+ print "%s on %s; marking defunct" % (e.code, f)
f.is_defunct = True
f.save()
else:

0 comments on commit c6427f6

Please sign in to comment.