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-03 13:13:29 +0100 |
| commit | f6f10858e5464445016cd4eff20878804d4cb858 (patch) | |
| tree | d515e89b815c72da32387531d1e53b8fadce33fb /scripts/contrib | |
| parent | ee31bad7627a7c8590a5a7dd3ffc210872067f44 (diff) | |
| download | poky-f6f10858e5464445016cd4eff20878804d4cb858.tar.gz | |
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>
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 @@ | |||
| 7 | import sys | 7 | import sys |
| 8 | import os | 8 | import os |
| 9 | import subprocess | 9 | import subprocess |
| 10 | import urllib2 | 10 | import urllib.request |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | # Allow importing scripts/lib modules | 13 | # Allow importing scripts/lib modules |
| @@ -47,7 +47,7 @@ def verifyHomepage(bbhandler): | |||
| 47 | homepage = data.getVar("HOMEPAGE", True) | 47 | homepage = data.getVar("HOMEPAGE", True) |
| 48 | if homepage: | 48 | if homepage: |
| 49 | try: | 49 | try: |
| 50 | urllib2.urlopen(homepage, timeout=5) | 50 | urllib.request.urlopen(homepage, timeout=5) |
| 51 | except Exception: | 51 | except Exception: |
| 52 | count = count + wgetHomepage(os.path.basename(realfn), homepage) | 52 | count = count + wgetHomepage(os.path.basename(realfn), homepage) |
| 53 | checked.append(realfn) | 53 | checked.append(realfn) |
