Skip to content

Commit 7424ac2

Browse files
committed
Warning when changing feed URL from redirection
1 parent 4e9f8f2 commit 7424ac2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rss2email.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ def run(num=None):
589589

590590
# Handle various status conditions, as required
591591
if 'status' in r:
592-
if r.status == 301: f.url = r['url']
592+
if r.status == 301:
593+
print >>warn, "W: feed moved; updating", f.url, "to", r['url']
594+
f.url = r['url']
593595
elif r.status == 410:
594596
print >>warn, "W: feed gone; deleting", f.url
595597
feeds.remove(f)

0 commit comments

Comments
 (0)