[core] Align error reporting methods with yt-dlp

This commit is contained in:
dirkf
2023-07-07 18:45:31 +01:00
parent f47fdb9564
commit d5ef405c5d
3 changed files with 36 additions and 16 deletions

View File

@ -72,7 +72,8 @@ class FakeYDL(YoutubeDL):
def to_screen(self, s, skip_eol=None):
print(s)
def trouble(self, s, tb=None):
def trouble(self, *args, **kwargs):
s = args[0] if len(args) > 0 else kwargs.get('message', 'Missing message')
raise Exception(s)
def download(self, x):