diff --git a/.pylintrc b/.pylintrc index 184da3d..78a42e4 100644 --- a/.pylintrc +++ b/.pylintrc @@ -22,6 +22,7 @@ enable=anomalous-backslash-in-string, missing-module-docstring, no-else-return, no-self-argument, + possibly-used-before-assignment, redefined-argument-from-local, too-few-public-methods, trailing-whitespace, diff --git a/src/wuttjamaican/email.py b/src/wuttjamaican/email.py index 43bc808..f5fce03 100644 --- a/src/wuttjamaican/email.py +++ b/src/wuttjamaican/email.py @@ -583,13 +583,12 @@ class EmailHandler(GenericHandler): def get_auto_body_template(self, key, mode): # pylint: disable=empty-docstring """ """ mode = mode.lower() - if mode not in ('txt', 'html'): - raise ValueError("requested mode not supported") - if mode == 'txt': templates = self.txt_templates elif mode == 'html': templates = self.html_templates + else: + raise ValueError("requested mode not supported") try: return templates.get_template(f'{key}.{mode}.mako')