[bitbake-devel] [PATCH 05/28] data_smart: Simplify ExpansionError exception
Richard Purdie
richard.purdie at linuxfoundation.org
Wed Jun 1 12:36:24 UTC 2016
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
--
2.5.0
More information about the bitbake-devel
mailing list