From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Chiang Subject: Re: [StGit PATCH v2 1/6] stg mail: Refactor __send_message and friends Date: Thu, 3 Dec 2009 12:27:47 -0700 Message-ID: <20091203192747.GE23258@ldl.fc.hp.com> References: <20091202003503.7737.51579.stgit@bob.kio> <20091202004605.7737.2077.stgit@bob.kio> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: catalin.marinas@gmail.com, git To: Karl Wiberg X-From: git-owner@vger.kernel.org Thu Dec 03 20:27:56 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGHLF-0004wL-5q for gcvg-git-2@lo.gmane.org; Thu, 03 Dec 2009 20:27:53 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756756AbZLCT1l (ORCPT ); Thu, 3 Dec 2009 14:27:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756753AbZLCT1l (ORCPT ); Thu, 3 Dec 2009 14:27:41 -0500 Received: from g4t0017.houston.hp.com ([15.201.24.20]:17227 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756734AbZLCT1k (ORCPT ); Thu, 3 Dec 2009 14:27:40 -0500 Received: from g4t0009.houston.hp.com (g4t0009.houston.hp.com [16.234.32.26]) by g4t0017.houston.hp.com (Postfix) with ESMTP id C3C3C38142; Thu, 3 Dec 2009 19:27:47 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g4t0009.houston.hp.com (Postfix) with ESMTP id 72FCCC112; Thu, 3 Dec 2009 19:27:47 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 4927ECF0017; Thu, 3 Dec 2009 12:27:47 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lPhfBEg2xFFn; Thu, 3 Dec 2009 12:27:47 -0700 (MST) Received: by ldl (Postfix, from userid 17609) id 33BE8CF0007; Thu, 3 Dec 2009 12:27:47 -0700 (MST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: * Karl Wiberg : > On Wed, Dec 2, 2009 at 1:46 AM, Alex Chiang wrote: > > > + if (smtppassword and not smtpuser): > > + raise Exception('SMTP password supplied, username needed') > > + if (smtpusetls and not smtpuser): > > + raise Exception('SMTP over TLS requested, username needed') > > + if (smtpuser and not smtppassword): > > + smtppassword = getpass.getpass("Please enter SMTP password: ") > > Sorry if I confused you with my earlier explanation; I only meant that > you should use the _form_ "raise Exception('message')", not that you > should change the exception type from CmdException to Exception. If > you try to trigger these errors, I think you'll find that in the case > of CmdException, StGit will print just the message and exit with an > error; whereas for straight Exception, it'll print the full backtrace > as well under the assumption that it's a program bug. Ah, ok. Will update. /ac