mirror of
https://github.com/caronc/apprise.git
synced 2025-02-07 22:10:04 +01:00
bugfix - exception no longer thrown on lone comment delimiter
This commit is contained in:
parent
a3abe06bbf
commit
805bec2396
@ -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
|
||||
|
||||
|
@ -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():
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user