Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/ytdl-org/youtube-dl:
  [utils] Fix crash in _report_ignoring_subs from c58b655  (ytdl-org#32762)
  • Loading branch information
github-actions[bot] committed Apr 5, 2024
2 parents 5f84fd2 + 4ea59c6 commit 06dbe81
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions youtube_dl/utils.py
Expand Up @@ -2371,15 +2371,24 @@ def set_alpn_protocols(ctx):
return YoutubeDLHTTPSHandler(params, context=context, **kwargs)


def bug_reports_message():
def bug_reports_message(before=';'):
if ytdl_is_updateable():
update_cmd = 'type youtube-dl -U to update'
else:
update_cmd = 'see https://yt-dl.org/update on how to update'
msg = '; please report this issue on https://yt-dl.org/bug .'
msg += ' Make sure you are using the latest version; %s.' % update_cmd
msg += ' Be sure to call youtube-dl with the --verbose flag and include its complete output.'
return msg
update_cmd = 'see https://github.com/ytdl-org/youtube-dl/#user-content-installation on how to update'

msg = (
'please report this issue on https://github.com/ytdl-org/youtube-dl/issues ,'
' using the appropriate issue template.'
' Make sure you are using the latest version; %s.'
' Be sure to call youtube-dl with the --verbose option and include the complete output.'
) % update_cmd

before = (before or '').rstrip()
if not before or before.endswith(('.', '!', '?')):
msg = msg[0].title() + msg[1:]

return (before + ' ' if before else '') + msg


class YoutubeDLError(Exception):
Expand Down

0 comments on commit 06dbe81

Please sign in to comment.