From 4078209d71f5117d800646a59bc157b51a204240 Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:30:57 +0200 Subject: [PATCH] pluginupdate: warn when github token isn't set and nproc > 1. Actually the error might happen even with nproc=1. --- maintainers/scripts/pluginupdate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py index 2e38023301a0..afe60069dd29 100644 --- a/maintainers/scripts/pluginupdate.py +++ b/maintainers/scripts/pluginupdate.py @@ -791,6 +791,11 @@ def update_plugins(editor: Editor, args): All input arguments are grouped in the `Editor`.""" log.info("Start updating plugins") + if args.proc > 1 and args.github_token == None: + log.warning("You have enabled parallel updates but haven't set a github token.\n" + "You may be hit with `HTTP Error 429: too many requests` as a consequence." + "Either set --proc=1 or --github-token=YOUR_TOKEN. ") + fetch_config = FetchConfig(args.proc, args.github_token) update = editor.get_update(args.input_file, args.outfile, fetch_config)