mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
print traceback on trouble if --verbose (why didn't I think of this before!?)
This commit is contained in:
parent
8d5d3a5d00
commit
59ce201915
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
import ctypes
|
import ctypes
|
||||||
|
@ -217,6 +218,8 @@ def trouble(self, message=None):
|
||||||
"""
|
"""
|
||||||
if message is not None:
|
if message is not None:
|
||||||
self.to_stderr(message)
|
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):
|
if not self.params.get('ignoreerrors', False):
|
||||||
raise DownloadError(message)
|
raise DownloadError(message)
|
||||||
self._download_retcode = 1
|
self._download_retcode = 1
|
||||||
|
|
Loading…
Reference in a new issue