projects
/
saartuer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ralfj.de:saartuer
[saartuer.git]
/
libtuer.py
diff --git
a/libtuer.py
b/libtuer.py
index 097a25abb6894eb1079cfe26802f7fd876d0ebe8..1789b90ce8c9307f22e06d9d5cdfe3623c456988 100644
(file)
--- 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):
# 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
# construct content
msg = email.mime.text.MIMEText(text.encode('UTF-8'), 'plain', 'UTF-8')
msg['Subject'] = subject