Skip to content

Commit 5bdb7a7

Browse files
moygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbed29f commit 5bdb7a7

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

contrib/hooks/multimail/CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
16
Release 1.1.0
27
=============
38

contrib/hooks/multimail/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
git-multimail Version 1.1.0
1+
git-multimail Version 1.1.1
22
===========================
33

44
.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master

contrib/hooks/multimail/README.Git

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ website:
66
https://github.com/git-multimail/git-multimail
77

88
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
1010
revision
1111

12-
1f0dbb3b60035767889b913df16d9231ecdb8709 refs/tags/1.1.0
12+
6d6c9eb62a054143322cfaecde3949189c065b46 refs/tags/1.1.1
1313

1414
Please see the README file in this directory for information about how
1515
to report bugs or contribute to git-multimail.

contrib/hooks/multimail/git_multimail.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,14 +1745,20 @@ def __init__(self, envelopesender, smtpserver,
17451745
self.username = smtpuser
17461746
self.password = smtppass
17471747
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)
17481754
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)
17501756
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)
17521758
elif self.security == 'tls':
17531759
if ':' not in self.smtpserver:
17541760
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)
17561762
self.smtp.ehlo()
17571763
self.smtp.starttls()
17581764
self.smtp.ehlo()

0 commit comments

Comments
 (0)