From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 864A1138A1A for ; Mon, 19 Jan 2015 15:34:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6E86E0984; Mon, 19 Jan 2015 15:34:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E51DE0975 for ; Mon, 19 Jan 2015 15:34:02 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 656C7340614 for ; Mon, 19 Jan 2015 15:34:01 +0000 (UTC) Date: Mon, 19 Jan 2015 07:33:41 -0800 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] chpathtool.py: avoid unnecessary optparse import Message-ID: <20150119073341.2c16af6b.dolsen@gentoo.org> In-Reply-To: <1421658797-19090-1-git-send-email-zmedico@gentoo.org> References: <1421658797-19090-1-git-send-email-zmedico@gentoo.org> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 31238e0a-2e99-4d01-94de-1abc2a396812 X-Archives-Hash: d18be42dda99ded22395e71363543ce4 On Mon, 19 Jan 2015 01:13:17 -0800 Zac Medico wrote: > Since commit d217db2bc76e4c1a2e75685b4a00e25f7d8142a8, the optparse > module has been imported unconditionally, even when the argparse > module is available. Fix it to import optparse only if the argparse > import fails. > > Fixes: d217db2bc76e ("Make use of optparse to fix argument parsing > for Python 2.6 in bin/chpathtool.py.") --- > bin/chpathtool.py | 22 ++++++++-------------- > 1 file changed, 8 insertions(+), 14 deletions(-) > > Looks good. :) -- Brian Dolbec