Skip to content

Commit

Permalink
Stop using deprecated dnspython method
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Jan 11, 2024
1 parent 1d8f789 commit e3145b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pretix/control/views/mailsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
def get_spf_record(hostname):
try:
r = dns.resolver.Resolver()
for resp in r.query(hostname, 'TXT'):
for resp in r.resolve(hostname, 'TXT'):
data = b''.join(resp.strings).decode()
if data.lower().strip().startswith('v=spf1 '): # RFC7208, section 4.5
return data
Expand Down

0 comments on commit e3145b7

Please sign in to comment.