Skip to content

Commit

Permalink
Port changes from workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Nov 23, 2017
1 parent fcc731b commit b68e55d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/workshop_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,15 @@ def check_email(email):
an '@', and more characters. It should not contain the default contact
"""

return bool(re.match(EMAIL_PATTERN, email)) and \
(email != DEFAULT_CONTACT_EMAIL)
# YAML automatically loads list-like strings as lists.
if (isinstance(emails, list) and len(emails) >= 0):
for email in emails:
if ((not bool(re.match(EMAIL_PATTERN, email))) or (email == DEFAULT_CONTACT_EMAIL)):
return False
else:
return False

return True


def check_eventbrite(eventbrite):
Expand Down

0 comments on commit b68e55d

Please sign in to comment.