Skip to content
Permalink
Browse files

core: context: append errors to error list

Signed-off-by: Florian Scherf <f.scherf@pengutronix.de>
  • Loading branch information...
fscherf committed Aug 16, 2019
1 parent 17828bf commit 006875ca8051c38159a5ee187f8eca57d6349707
Showing with 5 additions and 2 deletions.
  1. +5 −2 flamingo/core/context.py
@@ -47,8 +47,9 @@ def __init__(self, settings, contents=None):

self.plugin_paths.append(plugin_path)

except Exception:
except Exception as e:
self.logger.error('plugin setup failed', exc_info=True)
self.errors.append(e)

self.plugin_paths = list(set(self.plugin_paths))

@@ -214,10 +215,12 @@ def run_plugin_hook(self, name, *args, **kwargs):
try:
hook(self, *args, **kwargs)

except Exception:
except Exception as e:
self.logger.error('exception occoured while running %s.%s',
plugin_name, name, exc_info=True)

self.errors.append(e)

def render(self, content, template_name=''):
template_name = template_name or content['template']

0 comments on commit 006875c

Please sign in to comment.
You can’t perform that action at this time.