1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-03-22 17:55:07 +00:00

fix exception catching

This commit is contained in:
deadc0de6
2026-03-10 22:57:47 +01:00
parent 31c0e50cd5
commit 9d9a927d7c

View File

@@ -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])