mirror of https://github.com/craigerl/aprsd.git
Wrap another server call with try except
Dreamhost email is total garbage. Stop using it.
This commit is contained in:
parent
a5cc274ff5
commit
131919bdfb
|
@ -480,10 +480,15 @@ class APRSDEmailThread(threads.APRSDThread):
|
||||||
# LOG.debug("Message flags/tags: " + str(server.get_flags(msgid)[msgid]))
|
# LOG.debug("Message flags/tags: " + str(server.get_flags(msgid)[msgid]))
|
||||||
# if "APRS" not in server.get_flags(msgid)[msgid]:
|
# if "APRS" not in server.get_flags(msgid)[msgid]:
|
||||||
# in python3, imap tags are unicode. in py2 they're strings. so .decode them to handle both
|
# in python3, imap tags are unicode. in py2 they're strings. so .decode them to handle both
|
||||||
taglist = [
|
try:
|
||||||
x.decode(errors="ignore")
|
taglist = [
|
||||||
for x in server.get_flags(msgid)[msgid]
|
x.decode(errors="ignore")
|
||||||
]
|
for x in server.get_flags(msgid)[msgid]
|
||||||
|
]
|
||||||
|
except Exception as e:
|
||||||
|
LOG.exception("Failed to get flags.", e)
|
||||||
|
break
|
||||||
|
|
||||||
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.")
|
LOG.debug("Try single fetch.")
|
||||||
|
|
Loading…
Reference in New Issue