mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Swap quotes in email_alert segment
This commit is contained in:
parent
91c143bdd0
commit
5f9b8d5172
@ -242,8 +242,8 @@ def email_imap_alert(username, password, server='imap.gmail.com', port=993, fold
|
||||
try:
|
||||
mail = imaplib.IMAP4_SSL(server, port)
|
||||
mail.login(username, password)
|
||||
rc, message = mail.status(folder, "(UNSEEN)")
|
||||
unread_count = int(re.search("UNSEEN (\d+)", message[0]).group(1))
|
||||
rc, message = mail.status(folder, '(UNSEEN)')
|
||||
unread_count = int(re.search('UNSEEN (\d+)', message[0]).group(1))
|
||||
except (imaplib.IMAP4.error, AttributeError):
|
||||
return None
|
||||
if not unread_count:
|
||||
|
Loading…
x
Reference in New Issue
Block a user