summaryrefslogtreecommitdiff
path: root/debian/patches/0105-try_mail.diff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 20:08:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 20:08:51 +0200
commit9a955c414e34de441b5f188520314d54e3c5b3c5 (patch)
tree6ede28c8add650f5fcef3c920de66da2e0cd7c80 /debian/patches/0105-try_mail.diff
parent9a99fe51fb073a85169d4e50ca68cb0ec4531c8b (diff)
remove patches; rewrite d/changelog
Diffstat (limited to 'debian/patches/0105-try_mail.diff')
-rw-r--r--debian/patches/0105-try_mail.diff52
1 files changed, 0 insertions, 52 deletions
diff --git a/debian/patches/0105-try_mail.diff b/debian/patches/0105-try_mail.diff
deleted file mode 100644
index bc62ef1..0000000
--- a/debian/patches/0105-try_mail.diff
+++ /dev/null
@@ -1,52 +0,0 @@
-Description: try / except around mail functions
- add try / except around mail functions to
- prevent python errors messages
-Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
-Forwarded: via mail
-Applied-Upstream: <version|URL|commit, identifies patches merged upstream, optional>
-Reviewed-by:
-Last-Update: 2014-05-22
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: trunk/mwc.py
-===================================================================
---- trunk.orig/mwc.py
-+++ trunk/mwc.py
-@@ -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)
--
-- 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 getStoredHashes(shortname):