diff options
| -rw-r--r-- | bitbake/lib/bb/build.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index db5072cb4d..a5b99edb7b 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
| @@ -61,8 +61,13 @@ def reset_cache(): | |||
| 61 | # in all namespaces, hence we add them to __builtins__. | 61 | # in all namespaces, hence we add them to __builtins__. |
| 62 | # If we do not do this and use the exec globals, they will | 62 | # If we do not do this and use the exec globals, they will |
| 63 | # not be available to subfunctions. | 63 | # not be available to subfunctions. |
| 64 | __builtins__['bb'] = bb | 64 | if hasattr(__builtins__, '__setitem__'): |
| 65 | __builtins__['os'] = os | 65 | builtins = __builtins__ |
| 66 | else: | ||
| 67 | builtins = __builtins__.__dict__ | ||
| 68 | |||
| 69 | builtins['bb'] = bb | ||
| 70 | builtins['os'] = os | ||
| 66 | 71 | ||
| 67 | class FuncFailed(Exception): | 72 | class FuncFailed(Exception): |
| 68 | def __init__(self, name = None, logfile = None): | 73 | def __init__(self, name = None, logfile = None): |
