template_format_parse error message mangled by i8n
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Undecided
|
Sergey Kraynev |
Bug Description
When running this test, we get a failure because the i8n _() wrapper mangles the content of the message:
python -m testtools.run heat.tests.
Traceback (most recent call last):
File "heat/tests/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise mismatch_error
MismatchError: 'line 4, column 3' not in u'foo not in valid format: Error parsing template: while parsing a block mapping\ndid not find expected key\n in "None", line 1, column 1'
This seems to be caused by this code:
heat/common/
except yaml.YAMLError as yea:
msg = _('Error parsing template: %s') % yea
raise ValueError(msg)
putting some debug prints around the msg line shows this:
SHDEBUG yea = while parsing a block mapping in "<byte string>", line 4, column 3 did not find expected key in "<byte string>", line 6, column 5
SHDEBUG msg = Error parsing template: while parsing a block mapping did not find expected key in "None", line 1, column 1
Changed in heat: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-1 → 2015.1.0 |
P.s. it's reproduced only on local environment , not on Jenkins gates