diff --git a/daily_read/utils.py b/daily_read/utils.py index dc10009..ca1810a 100644 --- a/daily_read/utils.py +++ b/daily_read/utils.py @@ -41,7 +41,7 @@ def error_reporting(log, module="all"): for child in log.root.manager.loggerDict: if module in child: cache = log.root.getChild(child)._cache - # If there are errors messages in the log, the cache will the element 40: True + # If there are errors messages in the log, the cache will have the element 40: True if 40 in cache and cache[40]: error_string += f"\nErrors logged in {child} during execution" if error_string: diff --git a/tests/test_utils.py b/tests/test_utils.py index 009282a..04f1382 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -5,7 +5,7 @@ def test_error_reporting_without_error(): - """Test that no error is raised when log no has error messages""" + """Test that no error is raised when the log has no error messages""" daily_read_module_name = "tests" log = logging.getLogger(daily_read_module_name) log.info("Test info") @@ -17,7 +17,7 @@ def test_error_reporting_without_error(): def test_error_reporting_with_error(): - """Test error thrown when log has error messages""" + """Test error thrown when the log has error messages""" daily_read_module_name = "tests" log = logging.getLogger(daily_read_module_name) log.error("Test error message")