diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-07-21 16:17:00 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-07-21 16:17:00 +0100 |
commit | 3cca629ba712ad3ad6b9f6ac86797248101434ab (patch) | |
tree | 344efa716cd383089eed280d131117beebb12b14 /alot/settings | |
parent | 9a4158ebe38c40d7897c12be9b5257caec5e1293 (diff) |
fix issue with overwriting AttrSpecs
Diffstat (limited to 'alot/settings')
-rw-r--r-- | alot/settings/utils.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/alot/settings/utils.py b/alot/settings/utils.py index 0236cf58..d274fb7c 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -4,6 +4,7 @@ from configobj import ConfigObj, ConfigObjError, flatten_errors from validate import Validator from errors import ConfigError +from urwid import AttrSpec def read_config(configpath=None, specpath=None, checks={}): @@ -57,7 +58,11 @@ def resolve_att(a, fallback): if a is None: return fallback if a.background in ['default', '']: - a.background = fallback.background + bg = fallback.background + else: + bg = a.background if a.foreground in ['default', '']: - a.foreground = fallback.foreground - return a + fg = fallback.foreground + else: + fg = a.foreground + return AttrSpec(fg, bg) |