summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-07 16:17:34 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-07 16:18:09 +0000
commit7757de8a44c5baf4bc5ac08edecf4aca4c3e0678 (patch)
tree6aee4a748b78d72acb958fa0ede0b649b33ba97c /alot
parent9a26e91d4731b40d75842ad979bfd93934a32419 (diff)
remove decode_header calls
forgot to remove unnecessary `decode_header` calls for headers stored in `Envelope.headers`, which now contains decoded unicode strings directly.
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/envelope.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index d1830b5c..437bed97 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -10,7 +10,6 @@ from alot import buffers
from alot.commands import Command, registerCommand
from alot import settings
from alot import helper
-from alot.message import decode_header
from alot.commands import globals
from alot.helper import string_decode
@@ -52,8 +51,7 @@ class RefineCommand(Command):
self.key = key
def apply(self, ui):
- mail = ui.current_buffer.get_email()
- value = decode_header(mail.get(self.key, ''))
+ value = ui.current_buffer.envelope.get(self.key, '')
cmdstring = 'set %s %s' % (self.key, value)
ui.apply_command(globals.PromptCommand(cmdstring))
@@ -168,7 +166,7 @@ class EditCommand(Command):
# decode header
headertext = u''
for key in edit_headers:
- value = decode_header(self.envelope.headers.get(key, ''))
+ value = self.envelope.headers.get(key, '')
headertext += '%s: %s\n' % (key, value)
bodytext = self.envelope.body