[oe-commits] [bitbake] 05/23: data_smart: Simplify ExpansionError exception

git at git.openembedded.org git at git.openembedded.org
Wed May 18 22:25:31 UTC 2016


rpurdie pushed a commit to branch python3
in repository bitbake.

commit 37da58271f3d20fc6aec781edaaf7a2adb4509f1
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu May 12 08:22:52 2016 +0100

    data_smart: Simplify ExpansionError exception
    
    This seemingly convoluted syntax doesn't work in python3. Instead
    use the chained exception handling syntax which appears to make more
    sense here.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/data_smart.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 2a61386..25c412c 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -397,8 +397,7 @@ class DataSmart(MutableMapping):
             except bb.parse.SkipRecipe:
                 raise
             except Exception as exc:
-                exc_class, exc, tb = sys.exc_info()
-                raise ExpansionError, ExpansionError(varname, s, exc), tb
+                raise ExpansionError(varname, s, exc) from exc
 
         varparse.value = s
 

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


More information about the Openembedded-commits mailing list