Update regex/config and remove unused imports

This commit is contained in:
Imdad Ahad
2016-10-28 11:44:35 +01:00
parent a7e5285073
commit e58b63f504
4 changed files with 21 additions and 24 deletions

View File

@@ -205,5 +205,5 @@ def get_help_argument():
def is_gov_user(email_address):
valid_domains = current_app.config['EMAIL_DOMAIN_REGEXES']
email_regex = "[.|@]({})$".format("|".join(valid_domains))
email_regex = (r"[\.|@]({})$".format("|".join(valid_domains)))
return bool(re.search(email_regex, email_address.lower()))