diff options
-rw-r--r-- | alot/settings/checks.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/alot/settings/checks.py b/alot/settings/checks.py index 3665f415..dc68827a 100644 --- a/alot/settings/checks.py +++ b/alot/settings/checks.py @@ -7,7 +7,7 @@ from urwid import AttrSpec, AttrSpecError from urlparse import urlparse from validate import VdtTypeError from validate import is_list -from validate import ValidateError, VdtValueTooLongError +from validate import ValidateError, VdtValueTooLongError, VdtValueError from alot import crypto from alot.errors import GPGProblem @@ -49,6 +49,14 @@ def attr_triple(value): return mono, normal, high +def align_mode(value): + """ + test if value is one of 'left', 'right' or 'center' + """ + if value not in ['left', 'right', 'center']: + raise VdtValueError + return value + def mail_container(value): """ Check that the value points to a valid mail container, |