TOSCA: fix Python34 UnicodeDecodeError

Just recently Jenkins is failing with UnicodeDecodeError while reading the
template file.

Change-Id: I01abcbef6025a3abf838499e9041180a5fc3789f
This commit is contained in:
spzala 2015-05-21 02:39:59 -07:00
parent 6f88f7a6b3
commit 3516ab4fda

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import codecs
from collections import OrderedDict
import yaml
@ -20,7 +21,7 @@ else:
def load_yaml(path):
with open(path) as f:
with codecs.open(path, encoding='utf-8', errors='strict') as f:
return yaml.load(f.read(), Loader=yaml_loader)