forked from Github-Mirrors/canaille
tests: fix github CI, again
This commit is contained in:
parent
92c2e864af
commit
6dac4a1ca8
1 changed files with 8 additions and 5 deletions
|
@ -62,11 +62,14 @@ def send_email(subject, recipient, text, html, attachements=None):
|
|||
|
||||
attachements = attachements or []
|
||||
for cid, filename, value in attachements:
|
||||
if filetype := mimetypes.guess_type(filename): # pragma: no branch
|
||||
maintype, subtype = filetype[0].split("/")
|
||||
msg.get_payload()[1].add_related(
|
||||
value, maintype=maintype, subtype=subtype, cid=cid
|
||||
)
|
||||
filetype = mimetypes.guess_type(filename)
|
||||
if not filetype or not filetype[0]: # pragma: no cover
|
||||
continue
|
||||
|
||||
maintype, subtype = filetype[0].split("/")
|
||||
msg.get_payload()[1].add_related(
|
||||
value, maintype=maintype, subtype=subtype, cid=cid
|
||||
)
|
||||
|
||||
smtp = None
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue