We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 644dbbc commit fe47847Copy full SHA for fe47847
gen_syscalls.py
@@ -1,7 +1,7 @@
1
from ctags import CTags, TagEntry
2
from pathlib import Path
3
from lxml import html
4
-from urllib.request import urlopen
+from urllib.request import Request, urlopen
5
from shutil import copyfileobj
6
7
from tempfile import TemporaryDirectory
@@ -21,7 +21,8 @@ def fetch_kernel(tmpdir):
21
filename = linux_url.split('/')[-1]
22
tmpfile = Path(tmpdir.name) / filename
23
24
- with urlopen(linux_url) as fsrc, open(tmpfile, 'wb+') as fdst:
+ req = Request(linux_url, headers={'User-Agent': 'Wget/1.21.4'})
25
+ with urlopen(req) as fsrc, open(tmpfile, 'wb+') as fdst:
26
copyfileobj(fsrc, fdst)
27
28
with tarfile.open(tmpfile) as tar:
0 commit comments