+invirt-dns (0.0.9) unstable; urgency=low
+
+ * Don't error if dns.zone_files isn't set in the config.
+
+ -- Evan Broder <broder@mit.edu> Fri, 30 Jan 2009 20:09:35 -0500
+
invirt-dns (0.0.8) unstable; urgency=low
* Check the nics table first and then the machines table so that you can
from twisted.internet import defer
from twisted.python import failure
+from invirt.common import InvirtConfigError
from invirt.config import structs as config
import invirt.database
import psycopg2
if '__main__' == __name__:
resolvers = []
- for zone in config.dns.zone_files:
- for origin in config.dns.domains:
- r = QuotingBindAuthority(zone)
- # This sucks, but if I want a generic zone file, I have to
- # reload the information by hand
- r.origin = origin
- lines = open(zone).readlines()
- lines = r.collapseContinuations(r.stripComments(lines))
- r.parseLines(lines)
-
- resolvers.append(r)
+ try:
+ for zone in config.dns.zone_files:
+ for origin in config.dns.domains:
+ r = QuotingBindAuthority(zone)
+ # This sucks, but if I want a generic zone file, I have to
+ # reload the information by hand
+ r.origin = origin
+ lines = open(zone).readlines()
+ lines = r.collapseContinuations(r.stripComments(lines))
+ r.parseLines(lines)
+
+ resolvers.append(r)
+ except InvirtConfigError:
+ # Don't care if zone_files isn't defined
+ pass
resolvers.append(DatabaseAuthority())
verbosity = 0