Add support for py3.
This commit is contained in:
parent
032cfa1a8c
commit
5a763750d4
@ -11,6 +11,7 @@
|
||||
"""
|
||||
import re
|
||||
import ply.lex as lex
|
||||
from six import string_types
|
||||
|
||||
from lesscpy.lib import dom
|
||||
from lesscpy.lib import css
|
||||
@ -465,7 +466,7 @@ class LessLexer:
|
||||
Load lexer with content from `file` which can be a path or a file
|
||||
like object.
|
||||
"""
|
||||
if isinstance(file, basestring):
|
||||
if isinstance(file, string_types):
|
||||
with open(file) as f:
|
||||
self.lexer.input(f.read())
|
||||
else:
|
||||
|
@ -1 +1,2 @@
|
||||
ply
|
||||
six
|
||||
|
Loading…
Reference in New Issue
Block a user