Fixes broken zone-file when Domain.domain_ip6addr is empty
This commit is contained in:
1 parent
d523b4ae99
commit
15cde2cce4
2 files changed
+2
-2
No files matched your search
@@ -46,7 +46,7 @@ class Command(BaseCommand):
|
||||
|
||||
# do the binaries exist?
|
||||
for f in (self.checkzone_bin, self.bind_bin):
|
||||
if not os.path.isfile(f):
|
||||
if not os.path.isfile(f) and not debug:
|
||||
print("ERROR: no such file %s, exiting..." % f)
|
||||
if not debug:
|
||||
sys.exit(1)
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ class Domain(models.Model):
|
||||
if self.domain_ipaddr is not None:
|
||||
content += "@\tIN\tA\t%s\n" % self.domain_ipaddr
|
||||
|
||||
if self.domain_ip6addr is not None:
|
||||
if self.domain_ip6addr:
|
||||
content += "@\tIN\tAAAA\t%s\n" % self.domain_ip6addr
|
||||
|
||||
content += "; SRV records\n"
|
||||
|
||||
Reference in new issue
Block a user