diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-03-31 08:52:41 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-03-31 09:05:07 -0700 |
commit | 5ead16f14f996bcbb2fb14277b8ce5a9317b8160 (patch) | |
tree | 41f982a88d5d9eba3b02c7e49b2f3057652f7127 /lib/bb/utils.py | |
parent | 424d7e267b009cc19b8503eadab782736d9597d0 (diff) | |
download | bitbake-5ead16f14f996bcbb2fb14277b8ce5a9317b8160.tar.gz |
Add & utilize a simple_exec utility function
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r-- | lib/bb/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index de0f3d346..27233245a 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -210,6 +210,9 @@ def better_exec(code, context, text, realfile): raise +def simple_exec(code, context): + exec code in _context, context + def better_eval(source, locals): return eval(source, _context, locals) |