From 7f8d5a284be6b472bbca82229603df90a44260ac Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Thu, 18 Apr 2024 09:45:45 -0700 Subject: [PATCH] Add noqa for BaseException --- src/cloudformation_cli_python_lib/hook.py | 4 ++-- src/cloudformation_cli_python_lib/resource.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cloudformation_cli_python_lib/hook.py b/src/cloudformation_cli_python_lib/hook.py index 6a49e67..2d7b40b 100644 --- a/src/cloudformation_cli_python_lib/hook.py +++ b/src/cloudformation_cli_python_lib/hook.py @@ -152,7 +152,7 @@ def test_entrypoint( return e.to_progress_event() except Exception: # pylint: disable=broad-except LOG.exception("Exception caught") - except BaseException: # pylint: disable=broad-except + except BaseException: # pylint: disable=broad-except # noqa: B036 LOG.critical("Base exception caught (this is usually bad)", exc_info=True) return ProgressEvent.failed(HandlerErrorCode.InternalFailure, msg) @@ -260,7 +260,7 @@ def print_or_log(message: str) -> None: except Exception as e: # pylint: disable=broad-except print_or_log(f"Exception caught {e}") progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure) - except BaseException as e: # pylint: disable=broad-except + except BaseException as e: # pylint: disable=broad-except # noqa: B036 print_or_log(f"Base exception caught (this is usually bad) {e}") progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure) diff --git a/src/cloudformation_cli_python_lib/resource.py b/src/cloudformation_cli_python_lib/resource.py index a8d5be1..0ac7701 100644 --- a/src/cloudformation_cli_python_lib/resource.py +++ b/src/cloudformation_cli_python_lib/resource.py @@ -133,7 +133,7 @@ def test_entrypoint( return e.to_progress_event() except Exception: # pylint: disable=broad-except LOG.exception("Exception caught") - except BaseException: # pylint: disable=broad-except + except BaseException: # pylint: disable=broad-except # noqa: B036 LOG.critical("Base exception caught (this is usually bad)", exc_info=True) return ProgressEvent.failed(HandlerErrorCode.InternalFailure, msg) @@ -229,7 +229,7 @@ def print_or_log(message: str) -> None: except Exception as e: # pylint: disable=broad-except print_or_log(f"Exception caught {e}") progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure) - except BaseException as e: # pylint: disable=broad-except + except BaseException as e: # pylint: disable=broad-except # noqa: B036 print_or_log(f"Base exception caught (this is usually bad) {e}") progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure)