Commit 181cc102 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(configd, template) proceed with template generation when doing a wildcard search

(cherry picked from commit b9095a55)
(cherry picked from commit 1bf8b3aa)
parent 86cda20a
...@@ -32,6 +32,7 @@ import os ...@@ -32,6 +32,7 @@ import os
import os.path import os.path
import syslog import syslog
import collections import collections
import traceback
import copy import copy
import codecs import codecs
import jinja2 import jinja2
...@@ -309,7 +310,16 @@ class Template(object): ...@@ -309,7 +310,16 @@ class Template(object):
if result is None: if result is None:
result = list() result = list()
syslog.syslog(syslog.LOG_NOTICE, "generate template container %s" % template_name) syslog.syslog(syslog.LOG_NOTICE, "generate template container %s" % template_name)
try:
for filename in self._generate(template_name, create_directory): for filename in self._generate(template_name, create_directory):
result.append(filename) result.append(filename)
except Exception as render_exception:
if wildcard_pos > -1:
# log failure, but proceed processing when doing a wildcard search
syslog.syslog(syslog.LOG_ERR, 'error generating template %s : %s' % (template_name,
traceback.format_exc()))
else:
raise render_exception
return result return result
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment