Skip to content

Commit d65ce59

Browse files
authored
Add noqa for BaseException (#272)
1 parent 8303053 commit d65ce59

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cloudformation_cli_python_lib/hook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_entrypoint(
152152
return e.to_progress_event()
153153
except Exception: # pylint: disable=broad-except
154154
LOG.exception("Exception caught")
155-
except BaseException: # pylint: disable=broad-except
155+
except BaseException: # pylint: disable=broad-except # noqa: B036
156156
LOG.critical("Base exception caught (this is usually bad)", exc_info=True)
157157
return ProgressEvent.failed(HandlerErrorCode.InternalFailure, msg)
158158

@@ -260,7 +260,7 @@ def print_or_log(message: str) -> None:
260260
except Exception as e: # pylint: disable=broad-except
261261
print_or_log(f"Exception caught {e}")
262262
progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure)
263-
except BaseException as e: # pylint: disable=broad-except
263+
except BaseException as e: # pylint: disable=broad-except # noqa: B036
264264
print_or_log(f"Base exception caught (this is usually bad) {e}")
265265
progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure)
266266

src/cloudformation_cli_python_lib/resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_entrypoint(
133133
return e.to_progress_event()
134134
except Exception: # pylint: disable=broad-except
135135
LOG.exception("Exception caught")
136-
except BaseException: # pylint: disable=broad-except
136+
except BaseException: # pylint: disable=broad-except # noqa: B036
137137
LOG.critical("Base exception caught (this is usually bad)", exc_info=True)
138138
return ProgressEvent.failed(HandlerErrorCode.InternalFailure, msg)
139139

@@ -229,7 +229,7 @@ def print_or_log(message: str) -> None:
229229
except Exception as e: # pylint: disable=broad-except
230230
print_or_log(f"Exception caught {e}")
231231
progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure)
232-
except BaseException as e: # pylint: disable=broad-except
232+
except BaseException as e: # pylint: disable=broad-except # noqa: B036
233233
print_or_log(f"Base exception caught (this is usually bad) {e}")
234234
progress = ProgressEvent.failed(HandlerErrorCode.InternalFailure)
235235

0 commit comments

Comments
 (0)