Skip to content

Commit 9d5d26d

Browse files
rleonnmorey
authored andcommitted
azp: Overcome kernel.org AI protection check
[ Upstream commit 7f78758 ] kernel.org added DDOS protection from AI bot scrappers, which causes to the "urllib.error.HTTPError: HTTP Error 403: Forbidden" error while executing azp=checkpatch test. Official solution is to set meaningful User-agent, so do it. Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Nicolas Morey <[email protected]>
1 parent 2c73f87 commit 9d5d26d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

buildlib/azp-checkpatch

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ with tempfile.TemporaryDirectory() as dfn:
2424
sys.exit(0)
2525

2626
ckp = os.path.join(dfn, "checkpatch.pl")
27+
opener = urllib.request.build_opener()
28+
opener.addheaders = [('User-agent', 'rdma-core/1.x ([email protected])')]
29+
urllib.request.install_opener(opener)
2730
urllib.request.urlretrieve(
2831
"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl",
2932
ckp)

0 commit comments

Comments
 (0)