summaryrefslogtreecommitdiff
path: root/scanner.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-06-17 16:23:11 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-06-17 16:23:11 +0200
commit9f2076c62cc42fe572336d92a5a4d71c21eec3bd (patch)
tree50b7ff8999350d590deaa007b257ca04d2f5b359 /scanner.py
parentd6a64263556f471f9b3fa3cdbff032bc46c8888e (diff)
downloadruamel.yaml-9f2076c62cc42fe572336d92a5a4d71c21eec3bd.tar.gz
fixes issue #201: decoding Unicode
*When this change indeed resolves your problem, please **Close** this issue*. *(You can do so usingthe WorkFlow pull-down (close to the top right of this page)*
Diffstat (limited to 'scanner.py')
-rw-r--r--scanner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scanner.py b/scanner.py
index 5e4dccf..0aab137 100644
--- a/scanner.py
+++ b/scanner.py
@@ -1582,7 +1582,7 @@ class Scanner(object):
if PY3:
value = bytes(code_bytes).decode('utf-8')
else:
- value = unicode(''.join(code_bytes), 'utf-8') # type: ignore
+ value = unicode(b''.join(code_bytes), 'utf-8') # type: ignore
except UnicodeDecodeError as exc:
raise ScannerError("while scanning a %s" % name, start_mark,
str(exc), mark)