make the error on retrieving a zone message more correct
This commit is contained in:
parent
9f2bbdee0f
commit
1d584a0d8a
|
@ -44,8 +44,8 @@ class BindServer(models.Model):
|
||||||
each RR record and its attributes."""
|
each RR record and its attributes."""
|
||||||
try:
|
try:
|
||||||
zone = dns.zone.from_xfr(dns.query.xfr(self.hostname, zone))
|
zone = dns.zone.from_xfr(dns.query.xfr(self.hostname, zone))
|
||||||
except dns.exception.FormError, err:
|
except dns.exception.FormError:
|
||||||
raise Exception("The zone requested %s is not found on %s." % (zone, self.hostname))
|
raise Exception("There was an error attempting to retrieve zone %s on %s." % (zone, self.hostname))
|
||||||
|
|
||||||
names = zone.nodes.keys()
|
names = zone.nodes.keys()
|
||||||
names.sort()
|
names.sort()
|
||||||
|
|
Loading…
Reference in New Issue