diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-10 14:35:55 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 23:32:41 +0100 |
commit | 973b6b961597e421d06607908300441de3ff4e0c (patch) | |
tree | 822bf355bdf2550d1cff25f9a68b1baa60c1778f /bitbake/lib/bb/utils.py | |
parent | 909f1b7bf83d17efd06bcf470364385efe2704be (diff) | |
download | poky-973b6b961597e421d06607908300441de3ff4e0c.tar.gz |
bitbake: toaster: fix imports to work for python 3
Some APIs have been moved to other modules in python 3:
getstatusoutput: moved from commands to subproces
urlopen: moved from urllib2 to urllib.request
urlparse: moved from urlparse to urllib.parse
Made the imports work for both python versions by
catching ImportError and importing APIs from different
modules.
[YOCTO #9584]
(Bitbake rev: 5c39479fd7cb1b7c0bfc50c8cdfb9e5453bfa8e8)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 138da44ef1..8f75871c18 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -41,7 +41,6 @@ from subprocess import getstatusoutput | |||
41 | from contextlib import contextmanager | 41 | from contextlib import contextmanager |
42 | from ctypes import cdll | 42 | from ctypes import cdll |
43 | 43 | ||
44 | |||
45 | logger = logging.getLogger("BitBake.Util") | 44 | logger = logging.getLogger("BitBake.Util") |
46 | python_extensions = [e for e, _, _ in imp.get_suffixes()] | 45 | python_extensions = [e for e, _, _ in imp.get_suffixes()] |
47 | 46 | ||