mirror of https://github.com/craigerl/aprsd.git
Removed some noisy debug log.
Use the tracing instead to enable the debugging of email calls
This commit is contained in:
parent
131919bdfb
commit
9ba44a076c
|
@ -437,18 +437,14 @@ class APRSDEmailThread(threads.APRSDThread):
|
||||||
today = "{}-{}-{}".format(day, month, year)
|
today = "{}-{}-{}".format(day, month, year)
|
||||||
|
|
||||||
server = None
|
server = None
|
||||||
LOG.debug("Try _imap_connect")
|
|
||||||
try:
|
try:
|
||||||
server = _imap_connect()
|
server = _imap_connect()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception("IMAP failed to connect.", e)
|
LOG.exception("IMAP failed to connect.", e)
|
||||||
|
|
||||||
LOG.debug("Tried _imap_connect")
|
|
||||||
|
|
||||||
if not server:
|
if not server:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
LOG.debug("Try Server.search since today.")
|
|
||||||
try:
|
try:
|
||||||
messages = server.search(["SINCE", today])
|
messages = server.search(["SINCE", today])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -491,20 +487,16 @@ class APRSDEmailThread(threads.APRSDThread):
|
||||||
|
|
||||||
if "APRS" not in taglist:
|
if "APRS" not in taglist:
|
||||||
# if msg not flagged as sent via aprs
|
# if msg not flagged as sent via aprs
|
||||||
LOG.debug("Try single fetch.")
|
|
||||||
try:
|
try:
|
||||||
server.fetch([msgid], ["RFC822"])
|
server.fetch([msgid], ["RFC822"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception("Failed single server fetch for RFC822", e)
|
LOG.exception("Failed single server fetch for RFC822", e)
|
||||||
break
|
break
|
||||||
|
|
||||||
LOG.debug("Did single fetch.")
|
|
||||||
(body, from_addr) = parse_email(msgid, data, server)
|
(body, from_addr) = parse_email(msgid, data, server)
|
||||||
# unset seen flag, will stay bold in email client
|
# unset seen flag, will stay bold in email client
|
||||||
try:
|
try:
|
||||||
LOG.debug("Try remove flags.")
|
|
||||||
server.remove_flags(msgid, [imapclient.SEEN])
|
server.remove_flags(msgid, [imapclient.SEEN])
|
||||||
LOG.debug("Did remove flags.")
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception("Failed to remove flags SEEN", e)
|
LOG.exception("Failed to remove flags SEEN", e)
|
||||||
# Not much we can do here, so lets try and
|
# Not much we can do here, so lets try and
|
||||||
|
|
Loading…
Reference in New Issue