summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-16 10:49:06 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-16 10:49:06 +0100
commit3fb4d66b584beb3fc91fc22708cd83b125b567d9 (patch)
tree93c502868e778dd8c36fb06b06f09a831622af55 /alot/settings
parentb1d0512f0e20b709858151818ddc508fd00dfe4a (diff)
helper: get rid of decode_string()
It just adds unnecessary type confusion. In most places where it is used, the types are always str, so it does nothing. In the few others, the encoding/decoding is better handled explicitly.
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index ab5e70fb..e5dcc4b3 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -16,7 +16,7 @@ from configobj import ConfigObj, Section
from ..account import SendmailAccount
from ..addressbook.abook import AbookAddressBook
from ..addressbook.external import ExternalAddressbook
-from ..helper import string_decode, get_xdg_env
+from ..helper import get_xdg_env
from ..utils import configobj as checks
from .errors import ConfigError, NoMatchingAccount
@@ -422,7 +422,6 @@ class SettingsManager:
fallback_focus)
translated = cfg['tags'][sec]['translated']
- translated = string_decode(translated, 'UTF-8')
if translated is None:
translated = tag
translation = cfg['tags'][sec]['translation']
@@ -585,11 +584,11 @@ class SettingsManager:
fixed_format = self.get('timestamp_format')
if fixed_format:
- rep = string_decode(d.strftime(fixed_format), 'UTF-8')
+ rep = d.strftime(fixed_format)
else:
format_hook = self.get_hook('timestamp_format')
if format_hook:
- rep = string_decode(format_hook(d), 'UTF-8')
+ rep = format_hook(d)
else:
rep = _pretty_datetime(d)
return rep