diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-03-07 23:20:12 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-03-07 23:21:40 +0100 |
commit | 174481a048cdb9d4f39e2dd593c10ec8dd8e8d43 (patch) | |
tree | 6abbb7be7a59c3456f567d8351049b66eb9b7e98 /alot/settings/utils.py | |
parent | 14a14bb4acf122f339b0a8c40268bd81bcecf005 (diff) |
settings/utils: move resolve_att to the only place where it's used
Diffstat (limited to 'alot/settings/utils.py')
-rw-r--r-- | alot/settings/utils.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/alot/settings/utils.py b/alot/settings/utils.py index e830fafc..316083aa 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -6,7 +6,6 @@ import logging from configobj import (ConfigObj, ConfigObjError, flatten_errors, get_extra_values) -from urwid import AttrSpec from validate import Validator from .errors import ConfigError @@ -81,18 +80,3 @@ def read_config(configpath=None, specpath=None, checks=None, msg.append(str(val)) logging.info('\n'.join(msg)) return config - - -def resolve_att(a, fallback): - """ replace '' and 'default' by fallback values """ - if a is None: - return fallback - if a.background in ['default', '']: - bg = fallback.background - else: - bg = a.background - if a.foreground in ['default', '']: - fg = fallback.foreground - else: - fg = a.foreground - return AttrSpec(fg, bg) |