mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-14 07:22:18 +03:00
minor fixing
This commit is contained in:
parent
5c5a332e09
commit
f4cec96f0c
1 changed files with 5 additions and 2 deletions
|
@ -46,7 +46,10 @@ class Mail:
|
|||
self.server.quit()
|
||||
self.logger.debug('Disconnected')
|
||||
|
||||
def send_mail(self, subject, message, files=[]):
|
||||
def send_mail(self, subject, message, files=None):
|
||||
|
||||
if files is None:
|
||||
files = []
|
||||
|
||||
msg = MIMEMultipart()
|
||||
msg['Date'] = formatdate(localtime=True)
|
||||
|
@ -54,7 +57,7 @@ class Mail:
|
|||
|
||||
msg.attach(MIMEText(message))
|
||||
|
||||
#TODO files attachment max size
|
||||
# TODO files attachment max size
|
||||
if files is not None:
|
||||
for f in files:
|
||||
part = MIMEBase('application', "octet-stream")
|
||||
|
|
Loading…
Reference in a new issue