diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-04 16:06:27 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-14 23:05:14 +0100 |
commit | c589aff0804ea14f06ac93e1adcfbbae65ee9b3b (patch) | |
tree | a992d530d21c134b21d3da2c1e4bb03518bc4ca5 /scripts/lib/wic/msger.py | |
parent | dd732eeedd646363007bde0764d73d419613d9f6 (diff) | |
download | poky-c589aff0804ea14f06ac93e1adcfbbae65ee9b3b.tar.gz |
wic: use next builtin instead of .next method
Generators in Python 3 don't have .next method. It's recommended
to use 'next' builtin instead. As it also present in Python >= 2.6
it should make wic code compatible with both Python 2 and Python 3.
[YOCTO #9412]
(From OE-Core rev: 9b7ab632e47d786dd979262015dbfb1254103f83)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/msger.py')
-rw-r--r-- | scripts/lib/wic/msger.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py index 4d8e704172..fb8336d94a 100644 --- a/scripts/lib/wic/msger.py +++ b/scripts/lib/wic/msger.py | |||
@@ -148,7 +148,7 @@ def _split_msg(head, msg): | |||
148 | return head, msg | 148 | return head, msg |
149 | 149 | ||
150 | def get_loglevel(): | 150 | def get_loglevel(): |
151 | return (k for k, v in LOG_LEVELS.items() if v == LOG_LEVEL).next() | 151 | return next((k for k, v in LOG_LEVELS.items() if v == LOG_LEVEL)) |
152 | 152 | ||
153 | def set_loglevel(level): | 153 | def set_loglevel(level): |
154 | global LOG_LEVEL | 154 | global LOG_LEVEL |