Skip to content

Commit 17bf070

Browse files
committed
Change default to False for should_exit_on_error
1 parent 96bde80 commit 17bf070

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/hdx/utilities/error_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ class ErrorHandler:
1818
sorted.
1919
2020
Args:
21-
should_exit_on_error (bool): Whether to exit with a 1 code if there are errors. Default is True.
21+
should_exit_on_error (bool): Whether to exit with a 1 code if there are errors. Default is False.
2222
2323
"""
2424

2525
def __init__(
2626
self,
27-
should_exit_on_error: bool = True,
27+
should_exit_on_error: bool = False,
2828
):
2929
self.should_exit_on_error = should_exit_on_error
3030
self.shared_errors = {

tests/hdx/utilities/test_error_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_error_handler(self, caplog):
1717
assert len(errors.shared_errors["error"]) == 0
1818
with pytest.raises(SystemExit):
1919
with caplog.at_level(logging.ERROR):
20-
with ErrorHandler() as errors:
20+
with ErrorHandler(should_exit_on_error=True) as errors:
2121
errors.add("this is a error!")
2222
errors.add("this is a warning!", "warning 1", "warning")
2323
errors.add_missing_value(

0 commit comments

Comments
 (0)