mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-03-22 18:30:08 +00:00
fix exception catching
This commit is contained in:
@@ -62,9 +62,13 @@ class Templategen:
|
|||||||
try:
|
try:
|
||||||
mimes = mimes.split(',')
|
mimes = mimes.split(',')
|
||||||
self.mime_text = [mime.strip().lower() for mime in mimes]
|
self.mime_text = [mime.strip().lower() for mime in mimes]
|
||||||
except Exception as e:
|
except TypeError as e:
|
||||||
self.log.warn(f'{ENV_DOTDROP_MIME_TEXT} parsing: {e}')
|
self.log.warn(f'{ENV_DOTDROP_MIME_TEXT} parsing: {e}')
|
||||||
self.mime_text = []
|
self.mime_text = []
|
||||||
|
except AttributeError as e:
|
||||||
|
self.log.warn(f'{ENV_DOTDROP_MIME_TEXT} parsing: {e}')
|
||||||
|
self.mime_text = []
|
||||||
|
|
||||||
loader1 = FileSystemLoader(self.base)
|
loader1 = FileSystemLoader(self.base)
|
||||||
loader2 = FunctionLoader(self._template_loader)
|
loader2 = FunctionLoader(self._template_loader)
|
||||||
loader = ChoiceLoader([loader1, loader2])
|
loader = ChoiceLoader([loader1, loader2])
|
||||||
|
|||||||
Reference in New Issue
Block a user