Fix translating error in unittests
Change-Id: I1d64143a4bf8ddcf2ebe4a0bda049e962f3912e5 Closes-Bug: #1384669
This commit is contained in:
parent
8354c981ba
commit
1fd3d34a27
@ -14,6 +14,7 @@
|
||||
import itertools
|
||||
import json
|
||||
import re
|
||||
import six
|
||||
|
||||
from oslo.config import cfg
|
||||
import yaml
|
||||
@ -54,6 +55,7 @@ def simple_parse(tmpl_str):
|
||||
try:
|
||||
tpl = yaml.load(tmpl_str, Loader=yaml_loader)
|
||||
except yaml.YAMLError as yea:
|
||||
yea = six.text_type(yea)
|
||||
msg = _('Error parsing template: %s') % yea
|
||||
raise ValueError(msg)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user