summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-26 12:19:54 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-26 12:20:38 +0100
commite688d4876a761f9c89e427e9c451fd2968123909 (patch)
treeaa2da896d7536df1a08064b6d2fe340515d68471 /alot/helper.py
parent13cba7ad0bfcbb8eacfffaf1913d11897c8f91c2 (diff)
ComposeCommand: read template/signature as text
We should not try to guess anything, just use the platform encoding. Remove helper.try_decode(), as it has no more callers.
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/alot/helper.py b/alot/helper.py
index 8a7261e5..4283faea 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -195,17 +195,6 @@ def guess_encoding(blob):
raise Exception('Unknown magic API')
-def try_decode(blob):
- """Guess the encoding of blob and try to decode it into a str.
-
- :param bytes blob: The bytes to decode
- :returns: the decoded blob
- :rtype: str
- """
- assert isinstance(blob, bytes), 'cannot decode a str or non-bytes object'
- return blob.decode(guess_encoding(blob))
-
-
def libmagic_version_at_least(version):
"""
checks if the libmagic library installed is more recent than a given