summaryrefslogtreecommitdiff
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
commit9ce30db34dc4b0e036a79fe557cad2d537067e97 (patch)
tree55357ff206cc38d4502935cf7ac44b53edc0aabf
parentefe498757821622f4f0661a3ed13babb9c41aa02 (diff)
catch exception if tried to stop not running loop
-rw-r--r--src/leap/mail/imap/fetch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py
index 1c41813..ee9de3e 100644
--- a/src/leap/mail/imap/fetch.py
+++ b/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...')