From e880c92c659ef69f4e174bc0244dd34ebda741f4 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 13 Mar 2022 14:38:06 +0530 Subject: [PATCH] Exit after `--dump-user-agent` Bug in d1b5f70bc9f9dcda1544b88b42ecc25f7f7aa1c7 Closes #3055 --- yt_dlp/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 9138ec464..a433c4513 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -822,6 +822,7 @@ def _real_main(argv=None): if opts.dump_user_agent: ua = traverse_obj(opts.headers, 'User-Agent', casesense=False, default=std_headers['User-Agent']) write_string(f'{ua}\n', out=sys.stdout) + sys.exit(0) if print_extractor_information(opts, all_urls): sys.exit(0)