Add support for py3.

This commit is contained in:
Adi Roiban 2014-02-16 17:48:07 +02:00
parent 032cfa1a8c
commit 5a763750d4
2 changed files with 3 additions and 1 deletions

@ -11,6 +11,7 @@
""" """
import re import re
import ply.lex as lex import ply.lex as lex
from six import string_types
from lesscpy.lib import dom from lesscpy.lib import dom
from lesscpy.lib import css 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 Load lexer with content from `file` which can be a path or a file
like object. like object.
""" """
if isinstance(file, basestring): if isinstance(file, string_types):
with open(file) as f: with open(file) as f:
self.lexer.input(f.read()) self.lexer.input(f.read())
else: else:

@ -1 +1,2 @@
ply ply
six