ONE day i'll get initialization of subclasses/superclasses right.

This commit is contained in:
brent s. 2020-05-18 05:42:44 -04:00
parent bc12a6ad84
commit 92f857d967
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

@ -137,6 +137,10 @@ class RADVD(RA):
tpl_name = 'radvd.conf.j2' tpl_name = 'radvd.conf.j2'


def __init__(self, conf = None, tpl_name = None, tpl_dir = None): def __init__(self, conf = None, tpl_name = None, tpl_dir = None):
if not conf:
conf = self.conf
if not tpl_name:
tpl_name = self.tpl_name
super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir) super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir)
self.conf.ext_init() self.conf.ext_init()


@ -147,5 +151,9 @@ class DNSMasq(RA):
tpl_name = 'dnsmasq.include.j2' tpl_name = 'dnsmasq.include.j2'


def __init__(self, conf = None, tpl_name = None, tpl_dir = None): def __init__(self, conf = None, tpl_name = None, tpl_dir = None):
if not conf:
conf = self.conf
if not tpl_name:
tpl_name = self.tpl_name
super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir) super().__init__(conf = conf, tpl_name = tpl_name, tpl_dir = tpl_dir)
self.conf.ext_init() self.conf.ext_init()