[utils] ExtractorError: Fix for older python versions

Closes #2993
This commit is contained in:
pukkandan 2022-03-09 06:42:14 +05:30
parent 7a0ba75857
commit e491d06d34
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -1085,7 +1085,7 @@ class ExtractorError(YoutubeDLError):
def format_traceback(self):
return join_nonempty(
self.traceback and ''.join(traceback.format_tb(self.traceback)),
self.cause and ''.join(traceback.format_exception(self.cause)[1:]),
self.cause and ''.join(traceback.format_exception(None, self.cause, self.cause.__traceback__)[1:]),
delim='\n') or None