summaryrefslogtreecommitdiff
path: root/alot/command.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-02 19:24:34 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-02 19:24:34 +0100
commit53748dc7364851cc799bc6dd979a60ffbc7631e8 (patch)
treee3592e5a71552c6d8846cfdf226c69853c8686f1 /alot/command.py
parent0c3253b45380ab7b6ac7f423e3027e2cf56fb906 (diff)
parent3a148491e73ce13e07e1cf96825d2c12b5b59396 (diff)
Merge branch 'master' into helpdialogs
Diffstat (limited to 'alot/command.py')
-rw-r--r--alot/command.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/alot/command.py b/alot/command.py
index 721437c0..2ebc6132 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -26,15 +26,12 @@ import subprocess
import shlex
import email
import tempfile
-import mimetypes
-from email.parser import Parser
from email import Charset
from email.header import Header
-from email.message import Message
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import urwid
-from twisted.internet import reactor, defer
+from twisted.internet import defer
import buffer
import settings
@@ -70,8 +67,7 @@ class ExitCommand(Command):
if (yield ui.choice('realy quit?', select='yes', cancel='no',
msg_position='left')) == 'no':
return
- reactor.stop()
- raise urwid.ExitMainLoop()
+ ui.exit()
class OpenThreadCommand(Command):
@@ -347,7 +343,6 @@ class ToggleThreadTagCommand(Command):
#remove line from searchlist if thread doesn't match the query
qs = "(%s) AND thread:%s" % (cb.querystring,
self.thread.get_thread_id())
- msg_count = ui.dbman.count_messages(qs)
if ui.dbman.count_messages(qs) == 0:
ui.logger.debug('remove: %s' % self.thread)
cb.threadlist.remove(threadwidget)
@@ -448,12 +443,11 @@ class RetagCommand(Command):
self.thread = ui.current_buffer.get_selected_thread()
if not self.thread:
return
- initial_tagstring = ','.join(self.thread.get_tags())
tags = filter(lambda x: x, self.tagsstring.split(','))
ui.logger.info("got %s:%s" % (self.tagsstring, tags))
try:
self.thread.set_tags(tags)
- except DatabaseROError, e:
+ except DatabaseROError:
ui.notify('index in read-only mode', priority='error')
return