diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:57 +0000 |
commit | 1faea9a6c75f33109e8f66b57b432fdad57b3f46 (patch) | |
tree | 4184ce38ac0cf9d5a46bbbae03c87be82927f12b /src/ansiblelint/logger.py | |
parent | Adding upstream version 6.17.2. (diff) | |
download | ansible-lint-upstream.tar.xz ansible-lint-upstream.zip |
Adding upstream version 24.6.1.upstream/24.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ansiblelint/logger.py')
-rw-r--r-- | src/ansiblelint/logger.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ansiblelint/logger.py b/src/ansiblelint/logger.py index f0477cd..cb3bb19 100644 --- a/src/ansiblelint/logger.py +++ b/src/ansiblelint/logger.py @@ -1,4 +1,5 @@ """Utils related to logging.""" + import logging import time from collections.abc import Iterator @@ -17,15 +18,3 @@ def timed_info(msg: Any, *args: Any) -> Iterator[None]: finally: elapsed = time.time() - start _logger.info(msg + " (%.2fs)", *(*args, elapsed)) # noqa: G003 - - -def warn_or_fail(message: str) -> None: - """Warn or fail depending on the strictness level.""" - # pylint: disable=import-outside-toplevel - from ansiblelint.config import options - from ansiblelint.errors import StrictModeError - - if options.strict: - raise StrictModeError(message) - - _logger.warning(message) |