[oe-commits] [bitbake] 01/02: COW: Fix StopIteration warning

git at git.openembedded.org git at git.openembedded.org
Sat Sep 22 11:33:16 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 407d6e07b09123c12c382b4a92107f002c314b05
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Sep 21 19:55:26 2018 -0700

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/COW.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/COW.py b/lib/bb/COW.py
index bec6208..7817473 100644
--- a/lib/bb/COW.py
+++ b/lib/bb/COW.py
@@ -150,7 +150,7 @@ class COWDictMeta(COWMeta):
                 yield value
             if type == "items":
                 yield (key, value)
-        raise StopIteration()
+        return
 
     def iterkeys(cls):
         return cls.iter("keys")

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list