Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/distlib/__init__.py: 89%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

1# -*- coding: utf-8 -*- 

2# 

3# Copyright (C) 2012-2024 Vinay Sajip. 

4# Licensed to the Python Software Foundation under a contributor agreement. 

5# See LICENSE.txt and CONTRIBUTORS.txt. 

6# 

7import logging 

8 

9__version__ = '0.4.0.dev0' 

10 

11 

12class DistlibException(Exception): 

13 pass 

14 

15 

16try: 

17 from logging import NullHandler 

18except ImportError: # pragma: no cover 

19 

20 class NullHandler(logging.Handler): 

21 

22 def handle(self, record): 

23 pass 

24 

25 def emit(self, record): 

26 pass 

27 

28 def createLock(self): 

29 self.lock = None 

30 

31 

32logger = logging.getLogger(__name__) 

33logger.addHandler(NullHandler())