summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-07 16:57:46 +0200
committerKali Kaneko <kali@leap.se>2013-08-07 16:57:46 +0200
commit52649f07c7a8821548a6dc406252956eb03a96df (patch)
treef803587cbf60a77d7fb52efa3134467d0469a5eb /mail/src/leap
parent22e27a6f1ca4b5b53ac752e59ee7c21a1ed2d370 (diff)
catch exception if tried to stop not running loop
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/fetch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py
index 1c418130..ee9de3e0 100644
--- a/mail/src/leap/mail/imap/fetch.py
+++ b/mail/src/leap/mail/imap/fetch.py
@@ -93,7 +93,11 @@ class LeapIncomingMail(object):
Stops the loop that fetches mail.
"""
if self._loop:
- self._loop.stop()
+ try:
+ self._loop.stop()
+ except AssertionError:
+ logger.debug("It looks like we tried to stop a "
+ "loop that was not running.")
def _sync_soledad(self):
log.msg('syncing soledad...')