mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Replace use of removeprefix with slicing
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user