Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ignore exceptions when stopping reactor

.. in ui.exit
issue #264
  • Loading branch information...
commit 191b21a3b932767099600ef708eb7e921cb61e0a 1 parent cf8517c
@pazz authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 alot/ui.py
View
8 alot/ui.py
@@ -1,6 +1,7 @@
import urwid
import logging
from twisted.internet import reactor, defer
+import sys
from settings import settings
from buffers import BufferlistBuffer
@@ -182,7 +183,12 @@ def exit(self):
shuts down user interface without cleaning up.
Use a :class:`commands.globals.ExitCommand` for a clean shutdown.
"""
- reactor.stop()
+ exit_msg = None
+ try:
+ reactor.stop()
+ except Exception as e:
+ exit_msg = 'Could not stop reactor: {}.'.format(e)
+ logging.error(exit_msg + '\nShutting down anyway..')
def buffer_open(self, buf):
"""register and focus new :class:`~alot.buffers.Buffer`."""
Please sign in to comment.
Something went wrong with that request. Please try again.