mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Don't check for mail if username or password is missing
This commit is contained in:
parent
3f2ce0a570
commit
f8d6f53a24
@ -236,6 +236,8 @@ def email_imap_alert(username, password, server='imap.gmail.com', port=993, fold
|
||||
import imaplib
|
||||
import re
|
||||
|
||||
if not username or not password:
|
||||
return None
|
||||
try:
|
||||
mail = imaplib.IMAP4_SSL(server, port)
|
||||
mail.login(username, password)
|
||||
|
Loading…
x
Reference in New Issue
Block a user