fix typo in type detection in load_userdict

pull/307/head
Dingyuan Wang 9 years ago
parent 99d0fb1a8a
commit 5270ed66ff

@ -366,7 +366,7 @@ class Tokenizer(object):
f = open(f, 'rb')
for lineno, ln in enumerate(f, 1):
line = ln.strip()
if not isinstance(f, text_type):
if not isinstance(line, text_type):
try:
line = line.decode('utf-8').lstrip('\ufeff')
except UnicodeDecodeError:

Loading…
Cancel
Save