diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2011-10-07 16:04:11 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2011-10-07 16:04:11 +0200 |
commit | 6393f7eb041f6e9826026015bbce8ef100b89eff (patch) | |
tree | 41e14d75986fc23be667b65ffe74d09995758054 /alot | |
parent | bbc7edc56c27ca9c9133b07f4197568268db35d7 (diff) |
Close the temporary file before launching the helper app
This ensures that the buffers have been flushed.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/message.py b/alot/message.py index 706c2e79..22fb2529 100644 --- a/alot/message.py +++ b/alot/message.py @@ -201,11 +201,11 @@ def extract_body(mail): tmpfile.write(raw_payload.encode('utf8')) else: tmpfile.write(raw_payload) + tmpfile.close() #create and call external command cmd = handler % tmpfile.name rendered_payload = helper.cmd_output(cmd) #remove tempfile - tmpfile.close() os.unlink(tmpfile.name) if rendered_payload: # handler had output body_parts.append(rendered_payload.strip()) |