diff --git a/apprise/config/ConfigBase.py b/apprise/config/ConfigBase.py index d5acc4af..2c3bd5ff 100644 --- a/apprise/config/ConfigBase.py +++ b/apprise/config/ConfigBase.py @@ -236,7 +236,7 @@ class ConfigBase(URLBase): # otherwise. return list() - if result.group('comment') or not result.group('line'): + if not result.group('url'): # Comment/empty line; do nothing continue diff --git a/test/test_config_base.py b/test/test_config_base.py index 727b1ddc..6074224c 100644 --- a/test/test_config_base.py +++ b/test/test_config_base.py @@ -176,6 +176,18 @@ def test_config_base_config_parse_text(): assert isinstance(result, list) assert len(result) == 0 + # Test case where a comment is on it's own line with nothing else + result = ConfigBase.config_parse_text("#") + # We expect to parse 0 entries from the above + assert isinstance(result, list) + assert len(result) == 0 + + # Test case of empty file + result = ConfigBase.config_parse_text("") + # We expect to parse 0 entries from the above + assert isinstance(result, list) + assert len(result) == 0 + def test_config_base_config_parse_yaml(): """