Commit cad58963 by Carlos Corbacho

NullHandler should be an instance, not a class

The logger expects a NullHandler instance, not a class. Otherwise, if you run
this in an environment without a logger already set up, it raises an
AttributeError as 'level' is defined on the instance, not the class.
parent 2710353e
......@@ -25,7 +25,7 @@ import sys
LOGGER = logging.getLogger('rfc6266')
try:
LOGGER.addHandler(logging.NullHandler)
LOGGER.addHandler(logging.NullHandler())
except AttributeError:
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment