mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-30 22:25:19 +00:00
[utils] Better traceback for ExtractorError
This commit is contained in:
@@ -1076,9 +1076,10 @@ class ExtractorError(YoutubeDLError):
|
||||
'' if expected else bug_reports_message())))
|
||||
|
||||
def format_traceback(self):
|
||||
if self.traceback is None:
|
||||
return None
|
||||
return ''.join(traceback.format_tb(self.traceback))
|
||||
return join_nonempty(
|
||||
self.traceback and ''.join(traceback.format_tb(self.traceback)),
|
||||
self.cause and ''.join(traceback.format_exception(self.cause)[1:]),
|
||||
delim='\n') or None
|
||||
|
||||
|
||||
class UnsupportedError(ExtractorError):
|
||||
|
||||
Reference in New Issue
Block a user