mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 00:35:03 +02:00
Use super().__init__ instead of explicitly calling named super-class. (#9166)
* Use super().__init__ instead of explicitly calling named super-class. * Fix unittest (typo fix).
This commit is contained in:
@@ -167,6 +167,7 @@ class ErrorHandler:
|
||||
logger.debug("Calling signal %s", signum)
|
||||
os.kill(os.getpid(), signum)
|
||||
|
||||
|
||||
class ExitHandler(ErrorHandler):
|
||||
"""Context manager for running code that must be cleaned up.
|
||||
|
||||
@@ -175,5 +176,5 @@ class ExitHandler(ErrorHandler):
|
||||
regular exit.
|
||||
"""
|
||||
def __init__(self, func: Callable[..., Any], *args: Any, **kwargs: Any) -> None:
|
||||
ErrorHandler.__init__(self, func, *args, **kwargs)
|
||||
super().__init__(func, *args, **kwargs)
|
||||
self.call_on_regular_exit = True
|
||||
|
||||
@@ -133,7 +133,7 @@ class CredentialsConfigurationTest(test_util.TempDirTestCase):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.reset()
|
||||
logging.Handler.__init__(self, *args, **kwargs)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def emit(self, record):
|
||||
self.messages[record.levelname.lower()].append(record.getMessage())
|
||||
|
||||
Reference in New Issue
Block a user