aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2024-10-13 03:38:09 +0200
committerGitHub <noreply@github.com>2024-10-13 03:38:09 +0200
commitc5f0f58efd8c3930de8202c15a5c53b1b635bd51 (patch)
tree7a3d55ca8f49b55fa26b26ac80858cc6e8c81ec2 /yt_dlp/YoutubeDL.py
parentbabb70960595e2146f06f81affc29c7e713e34e2 (diff)
[cookies] Fix compatibility for Python <=3.9 in traceback
Authored by: Grub4K
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 4f45d7faf..9ac6ca0d0 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -4120,7 +4120,8 @@ class YoutubeDL:
self.params.get('cookiefile'), self.params.get('cookiesfrombrowser'), self)
except CookieLoadError as error:
cause = error.__context__
- self.report_error(str(cause), tb=''.join(traceback.format_exception(cause)))
+ # compat: <=py3.9: `traceback.format_exception` has a different signature
+ self.report_error(str(cause), tb=''.join(traceback.format_exception(None, cause, cause.__traceback__)))
raise
@property