mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
scripts: python3: fix urllib imports
Some functions and classes have been moved from urllib[2] to urllib.request and urllib.error in python 3. Used new imports to make the code working in python 3. (From OE-Core rev: ec3f1759e8b491a44a1fc1ecb6f89919dd30da97) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ee31bad762
commit
f6f10858e5
@@ -7,7 +7,7 @@
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import urllib2
|
||||
import urllib.request
|
||||
|
||||
|
||||
# Allow importing scripts/lib modules
|
||||
@@ -47,7 +47,7 @@ def verifyHomepage(bbhandler):
|
||||
homepage = data.getVar("HOMEPAGE", True)
|
||||
if homepage:
|
||||
try:
|
||||
urllib2.urlopen(homepage, timeout=5)
|
||||
urllib.request.urlopen(homepage, timeout=5)
|
||||
except Exception:
|
||||
count = count + wgetHomepage(os.path.basename(realfn), homepage)
|
||||
checked.append(realfn)
|
||||
|
||||
Reference in New Issue
Block a user