Skip to content
Snippets Groups Projects
Commit 209568f3 authored by Marc Trölitzsch's avatar Marc Trölitzsch Committed by Dan Michael O. Heggø
Browse files

remove custom null handler

Not required as `logging.NullHandler` is available on all supported python versions
parent 8d6e4853
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,4 @@ import warnings ...@@ -31,12 +31,4 @@ import warnings
# Show DeprecationWarning # Show DeprecationWarning
warnings.simplefilter('always', DeprecationWarning) warnings.simplefilter('always', DeprecationWarning)
# Logging: Add a null handler to avoid "No handler found" warnings. logging.getLogger(__name__).addHandler(logging.NullHandler())
try:
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment