Browse Source

Replace use of `removeprefix` with slicing

pull/978/head
Samuel Parkinson 3 years ago
parent
commit
ab64a6b0e4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      octodns/processor/spf.py

+ 2
- 2
octodns/processor/spf.py View File

@ -101,7 +101,7 @@ class SpfDnsLookupProcessor(BaseProcessor):
if spf is None:
return lookups
terms = spf.removeprefix('v=spf1 ').split(' ')
terms = spf[len('v=spf1 ') :].split(' ')
for term in terms:
if lookups > 10:
@ -120,7 +120,7 @@ class SpfDnsLookupProcessor(BaseProcessor):
# The include mechanism can result in further lookups after resolving the DNS record
if term.startswith('include:'):
domain = term.removeprefix('include:')
domain = term[len('include:') :]
answer = dns.resolver.resolve(domain, 'TXT')
answer_values = self._process_answer(answer)
lookups = self._check_dns_lookups(


Loading…
Cancel
Save