diff --git a/mdb/management/commands/zone-sync.py b/mdb/management/commands/zone-sync.py index bc3a838..29b39c4 100644 --- a/mdb/management/commands/zone-sync.py +++ b/mdb/management/commands/zone-sync.py @@ -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) diff --git a/mdb/models.py b/mdb/models.py index 969b530..eb3f3f1 100644 --- a/mdb/models.py +++ b/mdb/models.py @@ -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"