aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-07-17 01:30:34 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-07-17 01:30:34 +0200
commitf3bab0044e7ed1dfea5455ac9200daa13cf137ed (patch)
tree41cc226922f0075162771df4dc2d40670f08cb9d /youtube_dl/__init__.py
parentffd1833b870a32ff2a0ff123b8702cb536f22126 (diff)
Write debugging output to stderr (#1059)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index db63d0adb..4628ae933 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -580,7 +580,7 @@ def _real_main(argv=None):
})
if opts.verbose:
- ydl.to_screen(u'[debug] youtube-dl version ' + __version__)
+ sys.stderr.write(u'[debug] youtube-dl version ' + __version__ + u'\n')
try:
sp = subprocess.Popen(
['git', 'rev-parse', '--short', 'HEAD'],
@@ -589,11 +589,11 @@ def _real_main(argv=None):
out, err = sp.communicate()
out = out.decode().strip()
if re.match('[0-9a-f]+', out):
- ydl.to_screen(u'[debug] Git HEAD: ' + out)
+ sys.stderr.write(u'[debug] Git HEAD: ' + out + u'\n')
except:
sys.exc_clear()
- ydl.to_screen(u'[debug] Python version %s - %s' %(platform.python_version(), platform.platform()))
- ydl.to_screen(u'[debug] Proxy map: ' + str(proxy_handler.proxies))
+ sys.stderr.write(u'[debug] Python version %s - %s' %(platform.python_version(), platform.platform()) + u'\n')
+ sys.stderr.write(u'[debug] Proxy map: ' + str(proxy_handler.proxies) + u'\n')
ydl.add_default_info_extractors()