summaryrefslogtreecommitdiff
path: root/debian/patches/0105-try_mail.diff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-11 05:41:14 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-11 05:41:14 +0200
commite21453143818389060bf0bd6cfa627c11a63ede5 (patch)
tree88dc9473cc4e7efedad44682b1eb2e54d1e3e7c2 /debian/patches/0105-try_mail.diff
parent58816f014aeba5996db6f543e9efd21dd5e1db3a (diff)
New upstream release; refresh patches
Diffstat (limited to 'debian/patches/0105-try_mail.diff')
-rw-r--r--debian/patches/0105-try_mail.diff68
1 files changed, 34 insertions, 34 deletions
diff --git a/debian/patches/0105-try_mail.diff b/debian/patches/0105-try_mail.diff
index d390b6d..bc62ef1 100644
--- a/debian/patches/0105-try_mail.diff
+++ b/debian/patches/0105-try_mail.diff
@@ -12,41 +12,41 @@ Index: trunk/mwc.py
===================================================================
--- trunk.orig/mwc.py
+++ trunk/mwc.py
-@@ -225,16 +225,27 @@ def sendmail(receiver, subject, content,
- mail['Subject'] = Header(subject, defaultEncoding)
+@@ -232,16 +232,28 @@ def sendmail(receiver, subject, content,
+ mail['Subject'] = Header(subject, defaultEncoding)
- # initialize session once, not each time this method gets called
-- if mailsession is None:
-- mailsession = smtplib.SMTP(config.smtphost, config.smtpport)
-- if config.useTLS:
-- mailsession.ehlo()
-- mailsession.starttls()
-- if config.smtpusername is not None:
-- mailsession.login(config.smtpusername, config.smtppwd)
+ # initialize session once, not each time this method gets called
+- if mailsession is None:
+- mailsession = smtplib.SMTP(config.smtphost, config.smtpport)
+- if config.useTLS:
+- mailsession.ehlo()
+- mailsession.starttls()
+- if config.smtpusername is not None:
+- mailsession.login(config.smtpusername, config.smtppwd)
-
-- mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
--
-+ #
-+ # add try / except to open mailsession
-+ #
-+ try:
-+ if mailsession is None:
-+ mailsession = smtplib.SMTP(config.smtphost, config.smtpport)
-+ if config.useTLS:
-+ mailsession.ehlo()
-+ mailsession.starttls()
-+ mailsession.login(config.smtpusername, config.smtppwd)
-+ #
-+ # add try / except to send mail
-+ #
-+ except:
-+ print('Error: Open smtp-session')
-+ exit(4)
-+ try:
-+ mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
-+ except:
-+ print('Error: sendmail')
-+ exit(5)
+- mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
+
++ #
++ # add try / except to open mailsession
++ #
++ try:
++ if mailsession is None:
++ mailsession = smtplib.SMTP(config.smtphost, config.smtpport)
++ if config.useTLS:
++ mailsession.ehlo()
++ mailsession.starttls()
++ mailsession.login(config.smtpusername, config.smtppwd)
++ #
++ # add try / except to send mail
++ #
++ except:
++ print('Error: Open smtp-session')
++ exit(4)
++ try:
++ mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
++ except:
++ print('Error: sendmail')
++ exit(5)
# returns a list of all content that is stored locally for a specific site
- def getFileContents(shortname):
+ def getStoredHashes(shortname):