summaryrefslogtreecommitdiff
path: root/contrib/hooks
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2015-07-05 13:10:17 +0200
committerJunio C Hamano <gitster@pobox.com>2015-07-06 09:43:17 -0700
commit5bdb7a78adf2a2656a1915e6fa656aecb45c1fc3 (patch)
tree57fdddcce25fb904a45495d26511019cc5638fab /contrib/hooks
parentcbed29f37b690e0a497bd2b6ca9a5bdd7e6ea5aa (diff)
downloadgit-5bdb7a78adf2a2656a1915e6fa656aecb45c1fc3.tar.gz
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>
Diffstat (limited to 'contrib/hooks')
-rw-r--r--contrib/hooks/multimail/CHANGES5
-rw-r--r--contrib/hooks/multimail/README2
-rw-r--r--contrib/hooks/multimail/README.Git4
-rwxr-xr-xcontrib/hooks/multimail/git_multimail.py12
4 files changed, 17 insertions, 6 deletions
diff --git a/contrib/hooks/multimail/CHANGES b/contrib/hooks/multimail/CHANGES
index 0b823d8f5f..6bb12306b8 100644
--- a/contrib/hooks/multimail/CHANGES
+++ b/contrib/hooks/multimail/CHANGES
@@ -1,3 +1,8 @@
+Release 1.1.1 (bugfix-only release)
+===================================
+
+* The SMTP mailer was not working with Python 2.4.
+
Release 1.1.0
=============
diff --git a/contrib/hooks/multimail/README b/contrib/hooks/multimail/README
index 3a33cb734a..e552c90c45 100644
--- a/contrib/hooks/multimail/README
+++ b/contrib/hooks/multimail/README
@@ -1,4 +1,4 @@
-git-multimail Version 1.1.0
+git-multimail Version 1.1.1
===========================
.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master
diff --git a/contrib/hooks/multimail/README.Git b/contrib/hooks/multimail/README.Git
index 449d36f156..f5d59a8d31 100644
--- a/contrib/hooks/multimail/README.Git
+++ b/contrib/hooks/multimail/README.Git
@@ -6,10 +6,10 @@ website:
https://github.com/git-multimail/git-multimail
The version in this directory was obtained from the upstream project
-on Jun 18 2015 and consists of the "git-multimail" subdirectory from
+on July 03 2015 and consists of the "git-multimail" subdirectory from
revision
- 1f0dbb3b60035767889b913df16d9231ecdb8709 refs/tags/1.1.0
+ 6d6c9eb62a054143322cfaecde3949189c065b46 refs/tags/1.1.1
Please see the README file in this directory for information about how
to report bugs or contribute to git-multimail.
diff --git a/contrib/hooks/multimail/git_multimail.py b/contrib/hooks/multimail/git_multimail.py
index 7cb2b36cb4..c06ce7a515 100755
--- a/contrib/hooks/multimail/git_multimail.py
+++ b/contrib/hooks/multimail/git_multimail.py
@@ -1745,14 +1745,20 @@ class SMTPMailer(Mailer):
self.username = smtpuser
self.password = smtppass
try:
+ def call(klass, server, timeout):
+ try:
+ return klass(server, timeout=timeout)
+ except TypeError:
+ # Old Python versions do not have timeout= argument.
+ return klass(server)
if self.security == 'none':
- self.smtp = smtplib.SMTP(self.smtpserver, timeout=self.smtpservertimeout)
+ self.smtp = call(smtplib.SMTP, self.smtpserver, timeout=self.smtpservertimeout)
elif self.security == 'ssl':
- self.smtp = smtplib.SMTP_SSL(self.smtpserver, timeout=self.smtpservertimeout)
+ self.smtp = call(smtplib.SMTP_SSL, self.smtpserver, timeout=self.smtpservertimeout)
elif self.security == 'tls':
if ':' not in self.smtpserver:
self.smtpserver += ':587' # default port for TLS
- self.smtp = smtplib.SMTP(self.smtpserver, timeout=self.smtpservertimeout)
+ self.smtp = call(smtplib.SMTP, self.smtpserver, timeout=self.smtpservertimeout)
self.smtp.ehlo()
self.smtp.starttls()
self.smtp.ehlo()