diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-21 16:25:07 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-22 13:59:57 +0100 |
| commit | 21773a997a2a8ece3b9549c5940468c5a889ac40 (patch) | |
| tree | c5de5f77369519968552d4dbf7cc2f4e51a91f75 /bitbake/lib/bb/event.py | |
| parent | 1a7069e97b9ec208dc3cb70f9465b65de7e0a6f9 (diff) | |
| download | poky-21773a997a2a8ece3b9549c5940468c5a889ac40.tar.gz | |
bitbake: event/ast: Use better_exec instead of simple_exec
This improves the stacktraces dumped by bitbake when for example anonymous
python functions fail.
Also default to passing code strings to better_exec to match the behaviour of
simple_exec to aid the transition.
(Bitbake rev: 7e8205929ae953731a6854ea80b197847cff5771)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
| -rw-r--r-- | bitbake/lib/bb/event.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 20923b5f08..fa179d8a11 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
| @@ -175,7 +175,7 @@ def register(name, handler): | |||
| 175 | _handlers[name] = noop | 175 | _handlers[name] = noop |
| 176 | return | 176 | return |
| 177 | env = {} | 177 | env = {} |
| 178 | bb.utils.simple_exec(code, env) | 178 | bb.utils.better_exec(code, env) |
| 179 | func = bb.utils.better_eval(name, env) | 179 | func = bb.utils.better_eval(name, env) |
| 180 | _handlers[name] = func | 180 | _handlers[name] = func |
| 181 | else: | 181 | else: |
