def __init__(self, string_form):
list = string_form.split()
+ if len(list) < 3:
+ raise Exception("Invalid DNS entry %r" % string_form)
self.dest = None
self.port = None
self.ip = None
self.type = list[0]
self.name = list[1].lower()
if self.type == 'SRV':
+ if len(list) < 4:
+ raise Exception("Invalid DNS entry %r" % string_form)
self.dest = list[2].lower()
self.port = list[3]
elif self.type in ['A', 'AAAA']:
print "Skipping PDC entry (%s) as we are not a PDC" % line
return None
subline = samba.substitute_var(line, sub_vars)
- d = dnsobj(subline)
- return d
+ return dnsobj(subline)
def hostname_match(h1, h2):