From ec3f1759e8b491a44a1fc1ecb6f89919dd30da97 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 2 Jun 2016 13:12:50 +0300 Subject: 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. Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/contrib/verify-homepage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/contrib') diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py index 265ff65d3c..18bb15b277 100755 --- a/scripts/contrib/verify-homepage.py +++ b/scripts/contrib/verify-homepage.py @@ -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) -- cgit v1.2.3