Skip to content

Commit

Permalink
fix logger.addHandler(NullHandler) in python2.6 (NullHandler is py2.7+)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgmacedo committed Oct 30, 2013
1 parent af3c0c7 commit a79d475
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raspador/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from .item import Dictionary

logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
if hasattr(logging, 'NullHandler'):
logger.addHandler(logging.NullHandler())


class ParserMixin(object):
Expand Down

0 comments on commit a79d475

Please sign in to comment.