diff options
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
| -rw-r--r-- | bitbake/lib/bb/data_smart.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 1704ed631c..9436023b30 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
| @@ -28,7 +28,7 @@ BitBake build tools. | |||
| 28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 29 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 29 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
| 30 | 30 | ||
| 31 | import copy, re, sys, types | 31 | import copy, re, sys |
| 32 | import bb | 32 | import bb |
| 33 | from bb import utils | 33 | from bb import utils |
| 34 | from bb.COW import COWDictBase | 34 | from bb.COW import COWDictBase |
| @@ -66,10 +66,10 @@ class DataSmart: | |||
| 66 | code = match.group()[3:-1] | 66 | code = match.group()[3:-1] |
| 67 | codeobj = compile(code.strip(), varname or "<expansion>", "eval") | 67 | codeobj = compile(code.strip(), varname or "<expansion>", "eval") |
| 68 | s = utils.better_eval(codeobj, {"d": self}) | 68 | s = utils.better_eval(codeobj, {"d": self}) |
| 69 | if isinstance(s, types.IntType): s = str(s) | 69 | if isinstance(s, int): s = str(s) |
| 70 | return s | 70 | return s |
| 71 | 71 | ||
| 72 | if not isinstance(s, types.StringType): # sanity check | 72 | if not isinstance(s, basestring): # sanity check |
| 73 | return s | 73 | return s |
| 74 | 74 | ||
| 75 | if varname and varname in self.expand_cache: | 75 | if varname and varname in self.expand_cache: |
| @@ -81,7 +81,7 @@ class DataSmart: | |||
| 81 | s = __expand_var_regexp__.sub(var_sub, s) | 81 | s = __expand_var_regexp__.sub(var_sub, s) |
| 82 | s = __expand_python_regexp__.sub(python_sub, s) | 82 | s = __expand_python_regexp__.sub(python_sub, s) |
| 83 | if s == olds: break | 83 | if s == olds: break |
| 84 | if not isinstance(s, types.StringType): # sanity check | 84 | if not isinstance(s, basestring): # sanity check |
| 85 | bb.msg.error(bb.msg.domain.Data, 'expansion of %s returned non-string %s' % (olds, s)) | 85 | bb.msg.error(bb.msg.domain.Data, 'expansion of %s returned non-string %s' % (olds, s)) |
| 86 | except KeyboardInterrupt: | 86 | except KeyboardInterrupt: |
| 87 | raise | 87 | raise |
