mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
StopIterator has been depreciated, use return [PEP479]
https://www.python.org/dev/peps/pep-0479/#consequences-for-existing-code
This commit is contained in:
@@ -37,14 +37,14 @@ class MXRecordManager(models.Manager):
|
||||
if records.exists():
|
||||
for record in records:
|
||||
yield record
|
||||
raise StopIteration()
|
||||
return
|
||||
|
||||
self.get_queryset().filter(domain=domain).delete()
|
||||
|
||||
delta = datetime.timedelta(seconds=ttl)
|
||||
domain_mxs = lib.get_domain_mx_list(domain.name)
|
||||
if len(domain_mxs) == 0:
|
||||
raise StopIteration
|
||||
return
|
||||
for mx_addr, mx_ip_addr in domain_mxs:
|
||||
record = self.get_queryset().create(
|
||||
domain=domain,
|
||||
|
||||
Reference in New Issue
Block a user