__init__.py 625 B

123456789101112131415161718192021222324252627282930313233
  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. #
  7. import logging
  8. __version__ = '0.4.0'
  9. class DistlibException(Exception):
  10. pass
  11. try:
  12. from logging import NullHandler
  13. except ImportError: # pragma: no cover
  14. class NullHandler(logging.Handler):
  15. def handle(self, record):
  16. pass
  17. def emit(self, record):
  18. pass
  19. def createLock(self):
  20. self.lock = None
  21. logger = logging.getLogger(__name__)
  22. logger.addHandler(NullHandler())