fixed bug that was introduced a few months ago that made Util.py incompatible with python2. However, intranet.ipr.univ-rennes1.fr still uses python2 and as a result the web site was no longer functional once the we site was updated in Bug 2789 - Faire en sorte que la mise à jour jour du site web du cluster puisse se faire de graffy-ws2

This commit is contained in:
Guillaume Raffy 2019-11-21 09:00:57 +00:00
parent 788798c74c
commit 5fda1388a4
1 changed files with 7 additions and 3 deletions

10
Util.py
View File

@ -6,9 +6,13 @@ import re
# import os # import os
# import signal # import signal
import smtplib import smtplib
from email.mime.text import MIMEText import sys
from html.parser import HTMLParser if sys.version_info < (3, 0):
from HTMLParser import HTMLParser
from email.MIMEText import MIMEText
else:
from html.parser import HTMLParser
from email.mime.text import MIMEText
def sendTextMail(strFrom, to, strSubject, text): def sendTextMail(strFrom, to, strSubject, text):
# from = "SimpaCluster <guillaume.raffy@univ-rennes1.fr>" # from = "SimpaCluster <guillaume.raffy@univ-rennes1.fr>"