From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QglmI-000233-8A for garchives@archives.gentoo.org; Tue, 12 Jul 2011 22:50:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E2B9C21C0CF; Tue, 12 Jul 2011 22:49:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9468E21C0CF for ; Tue, 12 Jul 2011 22:49:51 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C5A952AC24B for ; Tue, 12 Jul 2011 22:49:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C4A228003D for ; Tue, 12 Jul 2011 22:49:49 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <3e7b0cbe1ccd875de2052821d91846880c76e6e0.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/__init__.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3e7b0cbe1ccd875de2052821d91846880c76e6e0 Date: Tue, 12 Jul 2011 22:49:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: e3b81ee2c6659843c00e8175c4946e5e commit: 3e7b0cbe1ccd875de2052821d91846880c76e6e0 Author: Zac Medico gentoo org> AuthorDate: Tue Jul 12 22:46:54 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jul 12 22:46:54 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D3e7b0cbe Avoid baseline subprocess import under python2. --- pym/portage/__init__.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 5411ec9..2a2eb99 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -17,10 +17,12 @@ try: import re import types =20 + # Try the commands module first, since this allows us to eliminate + # the subprocess module from the baseline imports under python2. try: - from subprocess import getstatusoutput as subprocess_getstatusoutput - except ImportError: from commands import getstatusoutput as subprocess_getstatusoutput + except ImportError: + from subprocess import getstatusoutput as subprocess_getstatusoutput =20 import platform =20