git-multimail: update to release 1.1.1
The only change is a bugfix: the SMTP mailer was not working with Python 2.4. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy committed
Jul 5, 2015 at 13:10 UTC
5bdb7a78adf2a2656a1915e6fa656aecb45c1fc3
4 files changed
+17
-6
contrib/hooks/multimail/CHANGES
+5
@@ -1,3 +1,8 @@
1
+Release 1.1.1 (bugfix-only release)
2
+===================================
3
+
4
+* The SMTP mailer was not working with Python 2.4.
5
+
6
Release 1.1.0
7
=============
8
contrib/hooks/multimail/README
+1
-1
@@ -1,4 +1,4 @@
1
-git-multimail Version 1.1.0
1
+git-multimail Version 1.1.1
2
===========================
3
4
.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master
contrib/hooks/multimail/README.Git
+2
-2
@@ -6,10 +6,10 @@ website:
6
https://github.com/git-multimail/git-multimail
7
8
The version in this directory was obtained from the upstream project
9
-on Jun 18 2015 and consists of the "git-multimail" subdirectory from
9
+on July 03 2015 and consists of the "git-multimail" subdirectory from
10
revision
11
12
- 1f0dbb3b60035767889b913df16d9231ecdb8709 refs/tags/1.1.0
12
+ 6d6c9eb62a054143322cfaecde3949189c065b46 refs/tags/1.1.1
13
14
Please see the README file in this directory for information about how
15
to report bugs or contribute to git-multimail.
contrib/hooks/multimail/git_multimail.py
+9
-3
@@ -1745,14 +1745,20 @@ class SMTPMailer(Mailer):
1745
self.username = smtpuser
1746
self.password = smtppass
1747
try:
1748
+ def call(klass, server, timeout):
1749
+ try:
1750
+ return klass(server, timeout=timeout)
1751
+ except TypeError:
1752
+ # Old Python versions do not have timeout= argument.
1753
+ return klass(server)
1754
if self.security == 'none':
1749
- self.smtp = smtplib.SMTP(self.smtpserver, timeout=self.smtpservertimeout)
1755
+ self.smtp = call(smtplib.SMTP, self.smtpserver, timeout=self.smtpservertimeout)
1756
elif self.security == 'ssl':
1751
- self.smtp = smtplib.SMTP_SSL(self.smtpserver, timeout=self.smtpservertimeout)
1757
+ self.smtp = call(smtplib.SMTP_SSL, self.smtpserver, timeout=self.smtpservertimeout)
1758
elif self.security == 'tls':
1759
if ':' not in self.smtpserver:
1760
self.smtpserver += ':587' # default port for TLS
1755
- self.smtp = smtplib.SMTP(self.smtpserver, timeout=self.smtpservertimeout)
1761
+ self.smtp = call(smtplib.SMTP, self.smtpserver, timeout=self.smtpservertimeout)
1762
self.smtp.ehlo()
1763
self.smtp.starttls()
1764
self.smtp.ehlo()