mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-26 23:04:00 +00:00
Make _Logger an abstract base class
The __metaclass__ syntax is a Python-2-ism. It was replaced with
class _Logger (object, metaclass=abc.ABCMeta):
in Python 3. And then Python 3.4 introduced abc.ABC which is an empty
class that has ABCMeta as the metaclass, making it simpler to define
abstract base classes.
This commit is contained in:
parent
ab476fa4bf
commit
22b0165b72
1 changed files with 1 additions and 2 deletions
|
|
@ -130,7 +130,7 @@ class LogStatistics (object):
|
|||
self.internal_errors += 1
|
||||
|
||||
|
||||
class _Logger (object):
|
||||
class _Logger (abc.ABC):
|
||||
"""
|
||||
Base class for logging of checked urls. It defines the public API
|
||||
(see below) and offers basic functionality for all loggers.
|
||||
|
|
@ -158,7 +158,6 @@ class _Logger (object):
|
|||
* log_url(url_data)
|
||||
Log a checked URL. Called by log_filter_url if do_print is True.
|
||||
"""
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
# A lowercase name for this logger, usable for option values
|
||||
LoggerName = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue