diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-21 19:55:26 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-22 15:52:12 -0700 |
commit | 7be6abc98d6e78814ac1a94ebb162073671659b8 (patch) | |
tree | 6943b77ea26415bf11a549f00b062209fe497676 | |
parent | ad38cb934608eaaeb39fff8f2d28b8e531837676 (diff) | |
download | poky-7be6abc98d6e78814ac1a94ebb162073671659b8.tar.gz |
bitbake: COW: Fix StopIteration warning
Fix the warning:
WARNING: lib/bb/data_smart.py:235: DeprecationWarning: generator 'COWDictMeta.iter' raised StopIteration
for k, v in self.variables.iteritems():
by using return from the generator, not raising StopIteration.
(Bitbake rev: 407d6e07b09123c12c382b4a92107f002c314b05)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/COW.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py index bec6208096..7817473ab8 100644 --- a/bitbake/lib/bb/COW.py +++ b/bitbake/lib/bb/COW.py | |||
@@ -150,7 +150,7 @@ class COWDictMeta(COWMeta): | |||
150 | yield value | 150 | yield value |
151 | if type == "items": | 151 | if type == "items": |
152 | yield (key, value) | 152 | yield (key, value) |
153 | raise StopIteration() | 153 | return |
154 | 154 | ||
155 | def iterkeys(cls): | 155 | def iterkeys(cls): |
156 | return cls.iter("keys") | 156 | return cls.iter("keys") |