Skip to content

Commit 9bdbc8a

Browse files
salty-horsedirkf
authored and
GitHub Actions
committed
[utils] Fix crash in _report_ignoring_subs from c58b655 (#32762)
Align `utils.bug_reports_message()` with yt-dlp yt-dlp/yt-dlp@5873d4ccdd, thanks fstirlitz --------- Co-authored-by: dirkf <[email protected]>
1 parent 38fb847 commit 9bdbc8a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

youtube_dl/utils.py

+15-6
Original file line numberDiff line numberDiff line change
@@ -2371,15 +2371,24 @@ def set_alpn_protocols(ctx):
23712371
return YoutubeDLHTTPSHandler(params, context=context, **kwargs)
23722372

23732373

2374-
def bug_reports_message():
2374+
def bug_reports_message(before=';'):
23752375
if ytdl_is_updateable():
23762376
update_cmd = 'type youtube-dl -U to update'
23772377
else:
2378-
update_cmd = 'see https://yt-dl.org/update on how to update'
2379-
msg = '; please report this issue on https://yt-dl.org/bug .'
2380-
msg += ' Make sure you are using the latest version; %s.' % update_cmd
2381-
msg += ' Be sure to call youtube-dl with the --verbose flag and include its complete output.'
2382-
return msg
2378+
update_cmd = 'see https://github.com/ytdl-org/youtube-dl/#user-content-installation on how to update'
2379+
2380+
msg = (
2381+
'please report this issue on https://github.com/ytdl-org/youtube-dl/issues ,'
2382+
' using the appropriate issue template.'
2383+
' Make sure you are using the latest version; %s.'
2384+
' Be sure to call youtube-dl with the --verbose option and include the complete output.'
2385+
) % update_cmd
2386+
2387+
before = (before or '').rstrip()
2388+
if not before or before.endswith(('.', '!', '?')):
2389+
msg = msg[0].title() + msg[1:]
2390+
2391+
return (before + ' ' if before else '') + msg
23832392

23842393

23852394
class YoutubeDLError(Exception):

0 commit comments

Comments
 (0)