commit | 77bb05e6853df8ec78dc49989c0989c0ff84f412 | [log] [tgz] |
---|---|---|
author | George McCollister <george.mccollister@gmail.com> | Thu Mar 30 09:44:25 2017 -0500 |
committer | Simon Glass <sjg@chromium.org> | Thu Apr 13 11:43:49 2017 -0600 |
tree | f50439a666cc62aad59bf49b611a1f43db75103d | |
parent | 113940668d60785c24633c268eb210baeb9aee41 [diff] |
dtoc: Decode val if it's a byte string With Python 3.5.2 encode will throw an exception if val is a byte array. Decode it to a string first. This assumes it's utf-8, if it's not valid utf-8 it will throw an exception. Signed-off-by: George McCollister <george.mccollister@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>