From babd356d63af05725f3248b9115ab08168e131e1 Mon Sep 17 00:00:00 2001 From: Steven Van Acker Date: Wed, 16 Mar 2016 14:52:45 +0100 Subject: [PATCH] use proper logging to avoid being chatty on stdout --- src/slimit/lexer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slimit/lexer.py b/src/slimit/lexer.py index 06cd7c5..33dc93e 100644 --- a/src/slimit/lexer.py +++ b/src/slimit/lexer.py @@ -25,6 +25,7 @@ __author__ = 'Ruslan Spivak ' import ply.lex +import logging from slimit.unicode_chars import ( LETTER, @@ -432,6 +433,6 @@ def t_ID(self, token): return token def t_error(self, token): - print 'Illegal character %r at %s:%s after %s' % ( - token.value[0], token.lineno, token.lexpos, self.prev_token) + logging.debug('Illegal character %r at %s:%s after %s' % ( + token.value[0], token.lineno, token.lexpos, self.prev_token)) token.lexer.skip(1)