Skip to content

Commit

Permalink
git-multimail: update to release 1.1.1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
moy authored and gitster committed Jul 6, 2015
1 parent cbed29f commit 5bdb7a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions contrib/hooks/multimail/CHANGES
Original file line number Diff line number Diff line change
@@ -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
=============

Expand Down
2 changes: 1 addition & 1 deletion contrib/hooks/multimail/README
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions contrib/hooks/multimail/README.Git
Original file line number Diff line number Diff line change
Expand Up @@ -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.
12 changes: 9 additions & 3 deletions contrib/hooks/multimail/git_multimail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1745,14 +1745,20 @@ def __init__(self, envelopesender, smtpserver,
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()
Expand Down

0 comments on commit 5bdb7a7

Please sign in to comment.