So, we disable the email function here.
This affects CentOS 5.4.
#!/usr/bin/python
-import email.mime.multipart
-import email.mime.text
+
import os
import shutil
import smtplib
"group_names" : None,
}
+# Python 2.4 does not have that email module, so
+# we disable the mail function here.
+try:
+ import email.mime.multipart
+ import email.mime.text
+ have_email = 1
+except ImportError:
+ have_email = 0
+
try:
import hashlib
have_hashlib = 1
if not config["error_report_recipient"]:
return
+ if not have_email:
+ log.error("Can't send mail because this python version does not support this")
+ return
+
try:
connection = smtplib.SMTP(config["smtp_server"])
#connection.set_debuglevel(1)