diff options
| -rw-r--r-- | bitbake/lib/bb/data_smart.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index dd20ca557e..111377a753 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
| @@ -261,12 +261,9 @@ class VariableHistory(object): | |||
| 261 | return | 261 | return |
| 262 | if 'op' not in loginfo or not loginfo['op']: | 262 | if 'op' not in loginfo or not loginfo['op']: |
| 263 | loginfo['op'] = 'set' | 263 | loginfo['op'] = 'set' |
| 264 | if 'detail' in loginfo: | ||
| 265 | loginfo['detail'] = str(loginfo['detail']) | ||
| 266 | if 'variable' not in loginfo or 'file' not in loginfo: | 264 | if 'variable' not in loginfo or 'file' not in loginfo: |
| 267 | raise ValueError("record() missing variable or file.") | 265 | raise ValueError("record() missing variable or file.") |
| 268 | var = loginfo['variable'] | 266 | var = loginfo['variable'] |
| 269 | |||
| 270 | if var not in self.variables: | 267 | if var not in self.variables: |
| 271 | self.variables[var] = [] | 268 | self.variables[var] = [] |
| 272 | if not isinstance(self.variables[var], list): | 269 | if not isinstance(self.variables[var], list): |
| @@ -325,7 +322,8 @@ class VariableHistory(object): | |||
| 325 | flag = '[%s] ' % (event['flag']) | 322 | flag = '[%s] ' % (event['flag']) |
| 326 | else: | 323 | else: |
| 327 | flag = '' | 324 | flag = '' |
| 328 | o.write("# %s %s:%s%s\n# %s\"%s\"\n" % (event['op'], event['file'], event['line'], display_func, flag, re.sub('\n', '\n# ', event['detail']))) | 325 | o.write("# %s %s:%s%s\n# %s\"%s\"\n" % \ |
| 326 | (event['op'], event['file'], event['line'], display_func, flag, re.sub('\n', '\n# ', str(event['detail'])))) | ||
| 329 | if len(history) > 1: | 327 | if len(history) > 1: |
| 330 | o.write("# pre-expansion value:\n") | 328 | o.write("# pre-expansion value:\n") |
| 331 | o.write('# "%s"\n' % (commentVal)) | 329 | o.write('# "%s"\n' % (commentVal)) |
| @@ -379,7 +377,7 @@ class VariableHistory(object): | |||
| 379 | if isset and event['op'] == 'set?': | 377 | if isset and event['op'] == 'set?': |
| 380 | continue | 378 | continue |
| 381 | isset = True | 379 | isset = True |
| 382 | items = d.expand(event['detail']).split() | 380 | items = d.expand(str(event['detail'])).split() |
| 383 | for item in items: | 381 | for item in items: |
| 384 | # This is a little crude but is belt-and-braces to avoid us | 382 | # This is a little crude but is belt-and-braces to avoid us |
| 385 | # having to handle every possible operation type specifically | 383 | # having to handle every possible operation type specifically |
