Skip to content

Commit

Permalink
The base domain name is already part of the Domain object, so I can
Browse files Browse the repository at this point in the history
just use that.
  • Loading branch information
jsf9k committed Jan 15, 2018
1 parent f2aad82 commit 7e94adf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions trustymail/trustymail.py
Expand Up @@ -474,10 +474,7 @@ def dmarc_scan(resolver, domain):
domain.dmarc_forensic_uris.append(uri)
email_address = parsed_uri["address"]
email_domain = email_address.split('@')[-1]
# Domain.domain_name is set to lowercase in
# Donain's constructor, so there is no need to call
# lower() on the right-hand side of the comparison
if get_public_suffix(email_domain).lower() != domain.base_domain.domain_name:
if get_public_suffix(email_domain).lower() != domain.base_domain_name.lower():
target = '{0}._report._dmarc.{1}'.format(domain.domain_name, email_domain)
error_message = '{0} does not indicate that it accepts DMARC reports about {1} - ' \
'https://tools.ietf.org' \
Expand Down

0 comments on commit 7e94adf

Please sign in to comment.