Skip to content

Commit

Permalink
fix: fix invalid if statment in amazon_date_regex function (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 authored Mar 7, 2025
1 parent 5ca8db8 commit c4e2263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ def amazon_date_regex(email_msg: str) -> str | None:
for body_regex in AMAZON_TIME_PATTERN_REGEX:
pattern = re.compile(rf"{body_regex}")
search = pattern.search(email_msg)
if search is not None and len(search.groups() > 0):
if search is not None and len(search.groups()) > 0:
_LOGGER.debug(
"Amazon Regex: %s Count: %s", body_regex, len(search.groups())
)
Expand Down

0 comments on commit c4e2263

Please sign in to comment.