mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-19 16:15:57 -05:00
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]))
|
||||
# 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
|
||||
taglist = [
|
||||
x.decode(errors="ignore")
|
||||
for x in server.get_flags(msgid)[msgid]
|
||||
]
|
||||
try:
|
||||
taglist = [
|
||||
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 msg not flagged as sent via aprs
|
||||
LOG.debug("Try single fetch.")
|
||||
|
Loading…
Reference in New Issue
Block a user