From 788a4fb065c4b1131ac2aee29a7e84f42f67f3f3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 11 Aug 2015 10:47:12 -0400 Subject: Make sure source_token_lines always returns Unicode strings for the token text. --- coverage/phystokens.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/phystokens.py') diff --git a/coverage/phystokens.py b/coverage/phystokens.py index 92da8d32..7092d39e 100644 --- a/coverage/phystokens.py +++ b/coverage/phystokens.py @@ -109,7 +109,7 @@ def source_token_lines(source): mark_end = False else: if mark_start and scol > col: - line.append(("ws", " " * (scol - col))) + line.append(("ws", u" " * (scol - col))) mark_start = False tok_class = tokenize.tok_name.get(ttype, 'xx').lower()[:3] if ttype == token.NAME and keyword.iskeyword(ttext): -- cgit v1.2.1