Module: check_mk
Branch: master
Commit: f16a9fabdb2bccd72943624eb3639b07000bc4e6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f16a9fabdb2bcc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 26 17:54:57 2016 +0200
pylint: Disable import error checking for python <2.5 compat code
---
notifications/mail | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/notifications/mail b/notifications/mail
index 015902a..0c01952 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -47,6 +47,7 @@ try:
from email.mime.image import MIMEImage
except ImportError:
# python <2.5 compat
+ # pylint: disable=no-name-in-module,import-error
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEImage import MIMEImage
@@ -392,7 +393,7 @@ def multipart_mail(target, subject, from_address, reply_to,
content_txt, content
part = MIMEApplication(contents, name = name)
else:
# python <2.5 compat
- part = MimeBase('application', 'octet-stream')
+ part = MimeBase('application', 'octet-stream') # pylint:
disable=undefined-variable
part.set_payload(contents)
Encoders.encode_base64(part)