Skip to content

Commit

Permalink
Fix check_meta_task()
Browse files Browse the repository at this point in the history
Test if tag.text is not None
  • Loading branch information
tomschr committed Jul 16, 2024
1 parent 93445ff commit 7f6707b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Version and author"""

__version__ = "0.3.1"
__version__ = "0.3.2"
__author__ = "Tom Schraitle <[email protected]>"
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def check_meta_task(tree: etree._ElementTree,
]

# Do we have children?
tasks = [tag.text.strip() for tag in meta.iterchildren()]
tasks = [tag.text.strip() for tag in meta.iterchildren()
if tag.text is not None]
if not tasks:
raise InvalidValueError(
f"Couldn't find any child elements in meta[@name='task']"
Expand Down

0 comments on commit 7f6707b

Please sign in to comment.