diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-30 16:10:59 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:05 +0100 |
commit | 2b362f63428bdd221d82141bb1615ee8950e40b3 (patch) | |
tree | 109f6da6a09317927c2adbd9a16dbc5bf9078f5c /bitbake/lib/toaster/toastergui/widgets.py | |
parent | 2de58c97a5e7d9c0687f66da291c6dc3d37a755a (diff) | |
download | poky-2b362f63428bdd221d82141bb1615ee8950e40b3.tar.gz |
bitbake: toaster: fix urllib imports
Some functions have been moved from urllib to urllib.parse
in python 3. Modifying the code to import unquote, urlencode and
unquote_plus from urllib.parse if import from urllib fails should
make it working on both python 2 and python 3.
(Bitbake rev: b91aa29fa20befd9841678a727bb91100363518f)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/widgets.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/widgets.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index 19850fbcf4..551c33cff7 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py | |||
@@ -38,7 +38,11 @@ import json | |||
38 | import collections | 38 | import collections |
39 | import operator | 39 | import operator |
40 | import re | 40 | import re |
41 | import urllib | 41 | |
42 | try: | ||
43 | from urllib import unquote_plus | ||
44 | except ImportError: | ||
45 | from urllib.parse import unquote_plus | ||
42 | 46 | ||
43 | import logging | 47 | import logging |
44 | logger = logging.getLogger("toaster") | 48 | logger = logging.getLogger("toaster") |