From 48da9e2b7179571f1efc3d20990efe906b7a28ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 30 Aug 2010 13:13:20 +0200 Subject: [PATCH] Print http debugging to stderr. --- osc/core.py | 4 +--- osc/fetch.py | 11 +++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/osc/core.py b/osc/core.py index 6ee5f098..5e622deb 100644 --- a/osc/core.py +++ b/osc/core.py @@ -2036,9 +2036,7 @@ def http_request(method, url, headers={}, data=None, file=None, timeout=100): filefd = None if conf.config['http_debug']: - print - print - print '--', method, url + print >>sys.stderr, '\n\n--', method, url if method == 'POST' and not file and not data: # adding data to an urllib2 request transforms it into a POST diff --git a/osc/fetch.py b/osc/fetch.py index d39ff68f..f2d00480 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -92,10 +92,9 @@ class Fetcher: mg = MirrorGroup(self.gr, pac.urllist, failure_callback=(self.failureReport,(),{})) if self.http_debug: - print - print 'URLs to try for package \'%s\':' % pac - print '\n'.join(pac.urllist) - print + print >>sys.stderr, '\nURLs to try for package \'%s\':' % pac + print >>sys.stderr, '\n'.join(pac.urllist) + print >>sys.stderr (fd, tmpfile) = tempfile.mkstemp(prefix='osc_build') try: @@ -229,8 +228,8 @@ class Fetcher: sys.exit(0) except URLGrabError, e: if self.http_debug: - print "can't fetch key for %s: %s" %(i, e.strerror) - print "url: %s" % url + print >>sys.stderr, "can't fetch key for %s: %s" %(i, e.strerror) + print >>sys.stderr, "url: %s" % url if os.path.exists(dest): os.unlink(dest)