Browse Source

email_requests: Catch all connection related exceptions

Closes: #4160
Closes: #4105
3.2.x
Johann Bauer 7 years ago
parent
commit
8f31d224aa
No known key found for this signature in database GPG Key ID: 84F1BF925B1F484D
  1. 4
      plugins/email_requests/qt.py

4
plugins/email_requests/qt.py

@ -87,7 +87,7 @@ class Processor(threading.Thread, PrintError):
try:
self.M = imaplib.IMAP4_SSL(self.imap_server)
self.M.login(self.username, self.password)
except imaplib.IMAP4.error as e:
except BaseException as e:
self.print_error(e)
self.connect_wait *= 2
# Reconnect when host changes
@ -111,7 +111,7 @@ class Processor(threading.Thread, PrintError):
s.login(self.username, self.password)
s.sendmail(self.username, [recipient], msg.as_string())
s.quit()
except smtplib.SMTPException as e:
except BaseException as e:
self.print_error(e)

Loading…
Cancel
Save