X-Git-Url: https://git.ralfj.de/saartuer.git/blobdiff_plain/41111d6443061891dd2ec7d5bf5ab856c0546fc0..9a0250c32f71db043dc1690be985d92459a3dbff:/libtuer.py?ds=inline diff --git a/libtuer.py b/libtuer.py index 097a25a..1789b90 100644 --- a/libtuer.py +++ b/libtuer.py @@ -10,7 +10,8 @@ printLevel = logging.DEBUG # Mail logging handler def sendeMail(subject, text, receivers, sender='sphinx@hacksaar.de', replyTo=None): - if not isinstance(type(receivers), list): receivers = [receivers] + assert isinstance(receivers, list) + if not len(receivers): return # nothing to do # construct content msg = email.mime.text.MIMEText(text.encode('UTF-8'), 'plain', 'UTF-8') msg['Subject'] = subject