Use unicode for debug string
On Python2, the "line" variable here is a unicode string, but the LOG.debug statement is trying to format it with a bytes string; this leads to a conversion error when the line has unicode characters in it. Ensure the logging format string is a unicode object to avoid this. Change-Id: I9948ffcea3fd10c4b6695593fa2a42731b44c02f
This commit is contained in:
parent
8acb2a36d3
commit
355e1674be
|
@ -111,7 +111,7 @@ class ReleaseNotesDirective(rst.Directive):
|
|||
source_name = '<%s %s>' % (__name__, branch or 'current branch')
|
||||
result = statemachine.ViewList()
|
||||
for line_num, line in enumerate(text.splitlines(), 1):
|
||||
LOG.debug('{:>4d}: {}'.format(line_num, line))
|
||||
LOG.debug(u'{:>4d}: {}'.format(line_num, line))
|
||||
result.append(line, source_name, line_num)
|
||||
|
||||
node = nodes.section()
|
||||
|
|
Loading…
Reference in New Issue