Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EEA41F70A for ; Wed, 8 May 2013 15:34:59 +0000 (UTC) Received: (qmail 39896 invoked by uid 500); 8 May 2013 15:34:59 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 39808 invoked by uid 500); 8 May 2013 15:34:59 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 39184 invoked by uid 99); 8 May 2013 15:34:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2013 15:34:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B8DD4889C0A; Wed, 8 May 2013 15:34:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org Date: Wed, 08 May 2013 15:35:17 -0000 Message-Id: <90dcdeadf41a47379d8c470191f34437@git.apache.org> In-Reply-To: <5a003d12bac04779b1826db6266a34a0@git.apache.org> References: <5a003d12bac04779b1826db6266a34a0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [20/50] git commit: [#6186] make SMTP timeouts configurable [#6186] make SMTP timeouts configurable Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/404b1528 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/404b1528 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/404b1528 Branch: refs/heads/tv/docs Commit: 404b152838b0ba65de2adc59f721c0a0c291302a Parents: d34331e Author: Dave Brondsema Authored: Wed May 1 18:33:57 2013 +0000 Committer: Dave Brondsema Committed: Wed May 1 18:33:57 2013 +0000 ---------------------------------------------------------------------- Allura/allura/lib/mail_util.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/404b1528/Allura/allura/lib/mail_util.py ---------------------------------------------------------------------- diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py index 166bc92..db7ddb3 100644 --- a/Allura/allura/lib/mail_util.py +++ b/Allura/allura/lib/mail_util.py @@ -218,11 +218,15 @@ class SMTPClient(object): if asbool(tg.config.get('smtp_ssl', False)): smtp_client = smtplib.SMTP_SSL( tg.config.get('smtp_server', 'localhost'), - asint(tg.config.get('smtp_port', 25))) + asint(tg.config.get('smtp_port', 25)), + timeout=float(tg.config.get('smtp_timeout', 10)), + ) else: smtp_client = smtplib.SMTP( tg.config.get('smtp_server', 'localhost'), - asint(tg.config.get('smtp_port', 465))) + asint(tg.config.get('smtp_port', 465)), + timeout=float(tg.config.get('smtp_timeout', 10)), + ) if tg.config.get('smtp_user', None): smtp_client.login(tg.config['smtp_user'], tg.config['smtp_password']) if asbool(tg.config.get('smtp_tls', False)):