]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
data_smart: Simplify ExpansionError exception
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 May 2016 07:22:52 +0000 (08:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Jun 2016 14:28:23 +0000 (15:28 +0100)
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@linuxfoundation.org>
lib/bb/data_smart.py

index 2a61386d897e0076c158aa99e681d61f17cc756e..25c412c1ad0c3865169cc8681df6496ef48b05c7 100644 (file)
@@ -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