mirror of
https://github.com/chatmail/core.git
synced 2026-04-23 08:26:30 +03:00
Lint
This commit is contained in:
@@ -1,13 +1,4 @@
|
||||
import os
|
||||
import threading
|
||||
import click
|
||||
import ssl
|
||||
import atexit
|
||||
import email
|
||||
import contextlib
|
||||
import time
|
||||
import imaplib
|
||||
from subprocess import call
|
||||
|
||||
INBOX = "Inbox"
|
||||
SENT = "Sent"
|
||||
@@ -25,6 +16,7 @@ def db_folder_attr(name):
|
||||
s.db_folder[name] = val
|
||||
return property(fget, fset, None, None)
|
||||
|
||||
|
||||
class ImapConn():
|
||||
def __init__(self, foldername, conn_info):
|
||||
self.foldername = foldername
|
||||
@@ -44,13 +36,12 @@ class ImapConn():
|
||||
result, data = self.connection.search(None, 'UnSeen')
|
||||
try:
|
||||
mails_uid = data[0].split()
|
||||
newest_mail = mails_uid[0]
|
||||
print("New mails")
|
||||
|
||||
# self.connection.store(data[0].replace(' ',','),'+FLAGS','\Seen')
|
||||
for e_id in mails_uid:
|
||||
self.connection.store(e_id, '+FLAGS', '\Seen')
|
||||
print("marked:",e_id)
|
||||
self.connection.store(e_id, '+FLAGS', '\\Seen')
|
||||
print("marked:", e_id)
|
||||
|
||||
return True
|
||||
except IndexError:
|
||||
|
||||
Reference in New Issue
Block a user