mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifupdown: networkinterfaces: making sure template engine will only be initialized once.
Ticket: None Reviewed By: Roopa Testing Done: Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@ -390,9 +390,10 @@ class networkInterfaces():
|
||||
# run through template engine
|
||||
if filedata and '%' in filedata:
|
||||
try:
|
||||
self._template_engine = templateEngine(
|
||||
self._template_engine_name,
|
||||
self._template_engine_path)
|
||||
if not self._template_engine:
|
||||
self._template_engine = templateEngine(
|
||||
self._template_engine_name,
|
||||
self._template_engine_path)
|
||||
rendered_filedata = self._template_engine.render(filedata)
|
||||
if rendered_filedata is filedata:
|
||||
self._currentfile_has_template = False
|
||||
|
Reference in New Issue
Block a user