summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/helper.py b/alot/helper.py
index 76183da3..05f7be66 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -49,8 +49,10 @@ def string_decode(string, enc='ascii'):
enc = 'ascii'
try:
string = unicode(string, enc, errors='replace')
- except LookupError:
+ except LookupError: # malformed enc string
string = string.decode('ascii', errors='replace')
+ except TypeError: # already unicode
+ pass
return string