Skip to content

Commit

Permalink
[cookies] Fix compatibility for Python <=3.9 in traceback
Browse files Browse the repository at this point in the history
Authored by: Grub4K
  • Loading branch information
Grub4K authored Oct 13, 2024
1 parent babb709 commit c5f0f58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -4120,7 +4120,8 @@ def cookiejar(self):
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
Expand Down

0 comments on commit c5f0f58

Please sign in to comment.