Coverage for /root/GitHubProjects/impacket/impacket/__init__.py: 56%

# Coverage for /root/GitHubProjects/impacket/impacket/__init__.py : 56%

## 9 statements

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1# Copyright (c) 2003-2016 CORE Security Technologies

2#

3# This software is provided under under a slightly modified version

4# of the Apache Software License. See the accompanying LICENSE file

5# for more information.

6#

7# Author: Alberto Solino (@agsolino)

8#

9

10# Set default logging handler to avoid "No handler found" warnings.

11 import logging

12 try: # Python 2.7+

13 from logging import NullHandler

14 except ImportError:

15 class NullHandler(logging.Handler):

16 def emit(self, record):

17 pass

18

19# All modules inside this library MUST use this logger (impacket)

20# It is up to the library consumer to do whatever is wanted

21# with the logger output. By default it is forwarded to the

22# upstream logger

23

24 LOG = logging.getLogger(__name__)

25 LOG.addHandler(NullHandler())