mirror of
https://github.com/powerline/powerline.git
synced 2025-07-24 22:36:01 +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:
|
try:
|
||||||
mail = imaplib.IMAP4_SSL(server, port)
|
mail = imaplib.IMAP4_SSL(server, port)
|
||||||
mail.login(username, password)
|
mail.login(username, password)
|
||||||
rc, message = mail.status(folder, "(UNSEEN)")
|
rc, message = mail.status(folder, '(UNSEEN)')
|
||||||
unread_count = int(re.search("UNSEEN (\d+)", message[0]).group(1))
|
unread_count = int(re.search('UNSEEN (\d+)', message[0]).group(1))
|
||||||
except (imaplib.IMAP4.error, AttributeError):
|
except (imaplib.IMAP4.error, AttributeError):
|
||||||
return None
|
return None
|
||||||
if not unread_count:
|
if not unread_count:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user