diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-11 11:02:21 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-11 11:02:21 +0100 |
commit | 59ce20191588028ee90551b40b33a8a36d778eec (patch) | |
tree | 279357ecc3a769679a16e9f12c356328fd781064 | |
parent | 8d5d3a5d00ac8a5d39321f301308abfb473981a8 (diff) |
print traceback on trouble if --verbose (why didn't I think of this before!?)
-rw-r--r-- | youtube_dl/FileDownloader.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index aad12fc1f..b43acd19b 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -10,6 +10,7 @@ import socket import subprocess import sys import time +import traceback if os.name == 'nt': import ctypes @@ -217,6 +218,8 @@ class FileDownloader(object): """ if message is not None: self.to_stderr(message) + if self.params.get('verbose'): + self.to_stderr(u''.join(traceback.format_list(traceback.extract_stack()))) if not self.params.get('ignoreerrors', False): raise DownloadError(message) self._download_retcode = 1 |