forked from Github-Mirrors/canaille
tests: fix github CI
This commit is contained in:
parent
14a93ad104
commit
92c2e864af
1 changed files with 5 additions and 7 deletions
|
@ -62,13 +62,11 @@ def send_email(subject, recipient, text, html, attachements=None):
|
|||
|
||||
attachements = attachements or []
|
||||
for cid, filename, value in attachements:
|
||||
filetype = mimetypes.guess_type(filename)
|
||||
maintype, subtype = (
|
||||
filetype[0].split("/") if filetype and filetype[0] else (None, None)
|
||||
)
|
||||
msg.get_payload()[1].add_related(
|
||||
value, maintype=maintype, subtype=subtype, cid=cid
|
||||
)
|
||||
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
|
||||
)
|
||||
|
||||
smtp = None
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue