Send warning output to stderr.
authorAdam Sampson <ats@offog.org>
Sat, 20 Sep 2003 17:14:48 +0000 (17:14 +0000)
committerAdam Sampson <ats@offog.org>
Sat, 20 Sep 2003 17:14:48 +0000 (17:14 +0000)
NEWS
rawdoglib/rawdog.py

diff --git a/NEWS b/NEWS
index ffeb07cc726672abf2b8e9be51a9a084047d1a05..13215f472bee91df5513e49b44b12b2a50496b49 100644 (file)
--- 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
index 192d352b3d1458e2bb6acfa7cae5f30204fe51dc..c5b7e45cafcd01c7338676eb1015f5b393955d16 100644 (file)
@@ -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