summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-23 22:07:15 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-23 22:07:15 +0100
commit19bd46e24aeebbed3089ae891c082f99c2ed6bfd (patch)
tree079387d3af6d2afec835f2f0fb06dad14565c4cf
parent08354e40ac10e8242c2bd0795912d2468e0365cc (diff)
cleanup and fix send command
-rw-r--r--alot/commands/envelope.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 75e531ee..81e34486 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -109,7 +109,7 @@ class EnvelopeSendCommand(Command):
def afterwards(returnvalue):
ui.clear_notify([clearme])
- if returnvalue is 'success': # sucessfully send mail
+ if returnvalue == 'success': # sucessfully send mail
cmd = BufferCloseCommand(buffer=envelope)
ui.apply_command(cmd)
ui.notify('mail send successful')
@@ -120,13 +120,7 @@ class EnvelopeSendCommand(Command):
write_fd = ui.mainloop.watch_pipe(afterwards)
def thread_code():
- ui.logger.debug('THREAD:SEND')
- ret = account.send_mail(mail)
- ui.logger.debug('THREAD:SEND')
- os.write(write_fd, ret or 'success')
-
- ui.logger.debug('STARTING THREAD')
- #thread_code()
+ os.write(write_fd, account.send_mail(mail) or 'success')
thread = threading.Thread(target=thread_code)
thread.start()