Completed
Push — develop ( 1cbd66...897924 )
by
unknown
01:10
created

scaleway.NullHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 3
Duplicated Lines 0 %
Metric Value
dl 0
loc 3
rs 10
wmc 1
1
# -*- coding: utf-8 -*-
2
#
3
# Copyright (c) 2013-2015 Online SAS and Contributors. All Rights Reserved.
4
#                         Julien Castets <[email protected]>
5
#
6
# Licensed under the BSD 2-Clause License (the "License"); you may not use this
7
# file except in compliance with the License. You may obtain a copy of the
8
# License at http://opensource.org/licenses/BSD-2-Clause
9
10
import logging
11
12
# To enable logging, the client application needs to configure the logging std
13
# module, by calling for instance logging.basicConfig(level=logging.INFO) or
14
# preferably logging.config.dictConfig.
15
16
try:  # Python 2.7+
17
    from logging import NullHandler
18
except ImportError:  # pragma no cover
19
    class NullHandler(logging.Handler):
20
        def emit(self, record):
21
            pass
22
23
# Prevent message "No handlers could be found for logger "dyntftpd"" to be
24
# displayed.
25
logging.getLogger(__name__).addHandler(NullHandler())
26
27
28
__version__ = '1.1.5'
29