diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-06-02 13:12:50 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 11:46:15 +0100 |
commit | ec3f1759e8b491a44a1fc1ecb6f89919dd30da97 (patch) | |
tree | 217273e893b3f561333c51e629ce562828cc5328 /scripts/contrib | |
parent | 438eabc248f272e3d272aecaa4c9cec177b172d5 (diff) | |
download | openembedded-core-ec3f1759e8b491a44a1fc1ecb6f89919dd30da97.tar.gz openembedded-core-ec3f1759e8b491a44a1fc1ecb6f89919dd30da97.tar.bz2 openembedded-core-ec3f1759e8b491a44a1fc1ecb6f89919dd30da97.zip |
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 <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-x | scripts/contrib/verify-homepage.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |