Skip to content

Commit cad5896

Browse files
committed
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.
1 parent 2710353 commit cad5896

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rfc6266.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
LOGGER = logging.getLogger('rfc6266')
2727
try:
28-
LOGGER.addHandler(logging.NullHandler)
28+
LOGGER.addHandler(logging.NullHandler())
2929
except AttributeError:
3030
pass
3131

0 commit comments

Comments
 (0)