From: Adam Sampson Date: Sat, 20 Sep 2003 17:14:48 +0000 (+0000) Subject: Send warning output to stderr. X-Git-Tag: v1.3~11 X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=dc91b92a36ce80ae4e1106125816ffef776db95d;p=rawdog%2F.git Send warning output to stderr. --- diff --git a/NEWS b/NEWS index ffeb07c..13215f4 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ now encoded in UTF-8 rather than ISO-8859-1 as before). Use standard option syntax (i.e. "--update --write" instead of "update write"). The old syntax will be supported until 2.0. +Warning output from --update now goes to stderr instead of stdout. + - rawdog 1.2 Updated feedparser to 2.5.2, which fixes a bug that was making rawdog diff --git a/rawdoglib/rawdog.py b/rawdoglib/rawdog.py index 192d352..c5b7e45 100644 --- a/rawdoglib/rawdog.py +++ b/rawdoglib/rawdog.py @@ -19,7 +19,7 @@ VERSION = "1.3" import feedparser from persister import Persistable, Persister -import os, time, sha, getopt +import os, time, sha, getopt, sys from StringIO import StringIO import timeoutsocket @@ -99,11 +99,11 @@ class Feed: self.last_update = now if error is not None: - print "Feed: " + self.url + print >>sys.stderr, "Feed: " + self.url if status is not None: - print "HTTP Status: " + str(status) - print error - print + print >>sys.stderr, "HTTP Status: " + str(status) + print >>sys.stderr, error + print >>sys.stderr if not non_fatal: return 0